From b744338fc05fe63a25fd59bb03b43314264dccaf Mon Sep 17 00:00:00 2001 From: Johannes Nussbaum Date: Fri, 20 Oct 2023 11:49:24 +0200 Subject: [PATCH] edit --- .../scenario_tanner/cleanup_tanner.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dsp_permissions_scripts/scenario_tanner/cleanup_tanner.py b/dsp_permissions_scripts/scenario_tanner/cleanup_tanner.py index 3acabf25..dbb87425 100644 --- a/dsp_permissions_scripts/scenario_tanner/cleanup_tanner.py +++ b/dsp_permissions_scripts/scenario_tanner/cleanup_tanner.py @@ -32,11 +32,12 @@ def _inspect_resources( elif "knora-api" in aff_res.prop_iri: prop_short = aff_res.prop_iri.replace(f"http://{host}/ontology/knora-api/v2#", "knora-api:") - if response_as_json[prop_short]["@type"] == "knora-api:LinkValue": - assert aff_res.val_iri == response_as_json[prop_short]["@id"] + if response_as_json[prop_short]["@type"] == "knora-api:LinkValue": + uuid_match = response_as_json[prop_short]["@id"] else: - value_has_uuid = response_as_json[prop_short]["knora-api:valueHasUUID"] - assert aff_res.val_iri.endswith(value_has_uuid) + uuid_match = response_as_json[prop_short]["knora-api:valueHasUUID"] + + assert aff_res.val_iri.endswith(uuid_match) def cleanup_tanner() -> None: