Skip to content

Commit

Permalink
Simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kkaris committed Jul 6, 2023
1 parent 5811c9f commit 53c6a31
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mira/sources/askenet/petrinet.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,9 @@ def template_model_from_askenet_json(model_json) -> TemplateModel:
time = ode_semantics.get("time")
if time:
time_units = time.get('units')
time_units_obj = None
if time_units:
time_units_expr = _get_sympy(time_units, UNIT_SYMBOLS)
time_units_obj = Unit(expression=time_units_expr)
time_units_expr = _get_sympy(time_units, UNIT_SYMBOLS)
time_units_obj = Unit(expression=time_units_expr) \
if time_units_expr else None
model_time = Time(name=time['id'], units=time_units_obj)
else:
model_time = None
Expand Down

0 comments on commit 53c6a31

Please sign in to comment.