Skip to content

Commit f02c21f

Browse files
dilpathBSnelling
authored andcommitted
move more from sciml pr
1 parent 24a7c2c commit f02c21f

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

petab/v2/lint.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -954,9 +954,12 @@ def run(self, problem: Problem) -> ValidationIssue | None:
954954
)
955955

956956
for mapping in problem.mappings:
957-
# petabEntityId is not referenced in any model
957+
# petabEntityId not referenced in any model, if alias
958958
for model in problem.models:
959-
if model.has_entity_with_id(mapping.petab_id):
959+
if (
960+
mapping.petab_id != mapping.model_id
961+
and model.has_entity_with_id(mapping.petab_id)
962+
):
960963
messages.append(
961964
f"`{mapping.petab_id}` is used in the mapping "
962965
"table and referenced directly in the model "

0 commit comments

Comments
 (0)