Skip to content

Commit 118aed7

Browse files
committed
fix aliased model logic - again
1 parent 3c1a09f commit 118aed7

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

petab/v2/lint.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,11 +1055,15 @@ def get_valid_parameters_for_parameter_table(
10551055
# aliases an invalid PEtab ID? See
10561056
# https://github.com/PEtab-dev/libpetab-python/pull/482#discussion_r3420762034
10571057
for mapping in problem.mappings:
1058-
if mapping.model_id and mapping.model_id in parameter_ids.keys():
1058+
if mapping.petab_id not in invalid:
10591059
parameter_ids[mapping.petab_id] = None
1060-
# An aliased model id is not a valid parameter id
1061-
if mapping.model_id in parameter_ids:
1062-
del parameter_ids[mapping.model_id]
1060+
# An aliased model id is not a valid parameter id
1061+
if (
1062+
mapping.model_id
1063+
and mapping.model_id != mapping.petab_id
1064+
and mapping.model_id in parameter_ids
1065+
):
1066+
del parameter_ids[mapping.model_id]
10631067

10641068
# add output parameters from observable table
10651069
output_parameters = problem.get_output_parameters()

0 commit comments

Comments
 (0)