-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add metabolites in nested contexts (#466)
With model as context, reaction.add_metabolites would make an addition of a partial call to reaction.subtract_metabolites, which in turn called reaction.add_metabolites thus adding the revert itself back to the history stack. Avoid this by adding a flag to avoid this addition from happening. Also add small performance boost to not go through with model.add_metabolites on empty list (can happen fairly often when manipulating many reactions).
- Loading branch information
Showing
3 changed files
with
32 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters