Skip to content

Commit

Permalink
Handle null input or outputs when ingesting petrinet amr transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
nanglo123 committed Nov 12, 2024
1 parent 094d61f commit 5e13194
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mira/sources/amr/petrinet.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ def template_model_from_amr_json(model_json) -> TemplateModel:
transition_id = transition['id'] # required, str
inputs = deepcopy(transition.get('input', [])) # required, Array[str]
outputs = deepcopy(transition.get('output', [])) # required, Array[str]
if inputs is None:
inputs = []
if outputs is None:
outputs = []
used_states |= (set(inputs) | set(outputs))
transition_grounding = transition.get('grounding', {}) # optional, Object
transition_properties = transition.get('properties', {}) # optional, Object
Expand Down

0 comments on commit 5e13194

Please sign in to comment.