Skip to content

Commit

Permalink
edit
Browse files Browse the repository at this point in the history
  • Loading branch information
jnussbaum committed Oct 20, 2023
1 parent 7a0dd16 commit b744338
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dsp_permissions_scripts/scenario_tanner/cleanup_tanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b744338

Please sign in to comment.