Skip to content

Commit 00c5055

Browse files
committed
Merge branch 'develop' into long_conditions
2 parents 4fd5e4c + b83e345 commit 00c5055

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

petab/v1/parameters.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,8 @@ def append_overrides(overrides):
332332
if not model.has_entity_with_id(p):
333333
parameter_ids[p] = None
334334

335-
# remove parameters that occur in the condition table and are overridden
336-
# for ALL conditions
337-
for p in condition_df.columns[~condition_df.isnull().any()]:
335+
# parameters that are overridden via the condition table are not allowed
336+
for p in condition_df.columns:
338337
try:
339338
del parameter_ids[p]
340339
except KeyError:

petab/v2/lint.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -770,19 +770,12 @@ def append_overrides(overrides):
770770
if not problem.model.has_entity_with_id(str(p))
771771
)
772772

773-
# remove parameters that occur in the condition table and are overridden
774-
# for ALL conditions
775-
if problem.condition_df is not None:
776-
...
777-
# FIXME: update to v2 -- we need to check for each value type
778-
# separately?!
779-
# for p in problem.condition_df.columns[
780-
# ~problem.condition_df.isnull().any()
781-
# ]:
782-
# try:
783-
# parameter_ids.remove(p)
784-
# except KeyError:
785-
# pass
773+
# parameters that are overridden via the condition table are not allowed
774+
for p in problem.condition_df[TARGET_ID].unique():
775+
try:
776+
parameter_ids.remove(p)
777+
except KeyError:
778+
pass
786779

787780
return parameter_ids
788781

0 commit comments

Comments
 (0)