Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jnussbaum committed Apr 15, 2024
1 parent 636939b commit 11b9fc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dsp_permissions_scripts/oap/oap_serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ def _iri_filter(res_oap: ResourceOap, iri: str) -> bool:
oaps: list[Oap] = []
deserialized_resource_iris = []

for res_iri, val_oaps in itertools.groupby(val_oaps, key=lambda x: x.resource_iri):
for res_iri, _val_oaps in itertools.groupby(val_oaps, key=lambda x: x.resource_iri):
filtered = list(filter(_iri_filter, res_oaps))
res_oap = filtered[0] if filtered else None
oaps.append(Oap(resource_oap=res_oap, value_oaps=val_oaps))
oaps.append(Oap(resource_oap=res_oap, value_oaps=_val_oaps))
deserialized_resource_iris.append(res_iri)

remaining_res_oaps = [oap for oap in res_oaps if oap.resource_iri not in deserialized_resource_iris]
Expand Down

0 comments on commit 11b9fc6

Please sign in to comment.