diff --git a/src/resources.py b/src/resources.py index dbc977a..5bf5c48 100644 --- a/src/resources.py +++ b/src/resources.py @@ -607,12 +607,12 @@ class ModifyEncodeResource(Resource): currentoutputneighboursids.append(outputneighbour.id) if 'outputNeighbours' in encodeobj: - for removeneighbours in listdiffer.elementsinfirstlistbutnotinsecond(currentoutputneighbours, + for removeneighbours in listdiffer.elementsinfirstlistbutnotinsecond(currentoutputneighboursids, encodeobj['outputNeighbours']): neighbourobj = StreamResource.query.filter_by(id=removeneighbours).first_or_404() neighbourobj.parent_id = None - for addneighbours in listdiffer.elementsinsecondlistbutnotinfirst(currentoutputneighbours, + for addneighbours in listdiffer.elementsinsecondlistbutnotinfirst(currentoutputneighboursids, encodeobj['outputNeighbours']): neighbourobj = StreamResource.query.filter_by(id=addneighbours).first_or_404() if neighbourobj.resource_type == StreamResourceTypeEnum.INGEST: