Skip to content

Commit

Permalink
added check to .meta
Browse files Browse the repository at this point in the history
  • Loading branch information
William Sprague committed Jan 6, 2025
1 parent 40735a8 commit dd59b6a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doranet/modules/synthetic/generate_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,8 @@ class Regioselectivity_filter(metadata.ReactionFilterBase):
def __call__(self, recipe: interfaces.ReactionExplicit) -> bool:
if self.regio_user is None: # if user doesn't use it
return True
if recipe.operator.meta is None:
return True
regio_rxn_tup = recipe.operator.meta["regioselectivity"]
if regio_rxn_tup is None: # if rxn doesn't have it
return True
Expand Down

0 comments on commit dd59b6a

Please sign in to comment.