Skip to content

Commit 3c4e252

Browse files
committed
up
1 parent f89d973 commit 3c4e252

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/reaction_network.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ function make_reaction(ex::Expr)
446446
pexprs = get_pexpr(parameters, Dict{Symbol, Expr}())
447447
rxexpr = get_rxexprs(reaction)
448448
iv = :(@variables $(DEFAULT_IV_SYM))
449-
449+
450450
# Returns the rephrased expression.
451451
quote
452452
$pexprs

src/reactionsystem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ function Reaction(rate, subs, prods, substoich, prodstoich;
193193

194194
# Deletes potential `:only_use_rate => ` entries from the metadata.
195195
if any(:only_use_rate == entry[1] for entry in metadata)
196-
findfirst(:only_use_rate == entry[1] for entry in metadata)
196+
deleteat!(metadata, findfirst(:only_use_rate == entry[1] for entry in metadata))
197197
end
198198

199199
Reaction(value(rate), subs, prods, substoich′, prodstoich′, ns, only_use_rate, metadata)
@@ -202,7 +202,7 @@ end
202202
# Checks if a metadata input has an entry :only_use_rate => true
203203
function metadata_only_use_rate_check(metadata)
204204
any(:only_use_rate == entry[1] for entry in metadata) || (return false)
205-
return metadata[findfirst(:only_use_rate == entry[1] for entry in metadata)]
205+
return metadata[findfirst(:only_use_rate == entry[1] for entry in metadata)][2]
206206
end
207207

208208
# three argument constructor assumes stoichiometric coefs are one and integers

0 commit comments

Comments
 (0)