From 11b9fc6af801d1aa789ad03bce43832e8e7ab379 Mon Sep 17 00:00:00 2001 From: Johannes Nussbaum Date: Mon, 15 Apr 2024 22:25:06 +0200 Subject: [PATCH] fix --- dsp_permissions_scripts/oap/oap_serialize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dsp_permissions_scripts/oap/oap_serialize.py b/dsp_permissions_scripts/oap/oap_serialize.py index 8a7e9c4c..d919e688 100644 --- a/dsp_permissions_scripts/oap/oap_serialize.py +++ b/dsp_permissions_scripts/oap/oap_serialize.py @@ -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]