Skip to content

Commit 4df4635

Browse files
committed
move more from sciml pr
1 parent d1f1c3d commit 4df4635

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)