From 2af08d842144d2b0cf9a31ddb4bada4fe983a2a2 Mon Sep 17 00:00:00 2001 From: Johan Marcusson Date: Tue, 30 Jan 2024 14:54:31 +0100 Subject: [PATCH] This workaround is not needed anymore since https://docs.sqlalchemy.org/en/20/changelog/migration_14.html#cascade-backrefs-behavior-deprecated-for-removal-in-2-0 --- src/cnaas_nms/devicehandler/update.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/cnaas_nms/devicehandler/update.py b/src/cnaas_nms/devicehandler/update.py index a5586ba8..109e4b03 100644 --- a/src/cnaas_nms/devicehandler/update.py +++ b/src/cnaas_nms/devicehandler/update.py @@ -354,9 +354,6 @@ def update_linknets( if not dry_run: session.add(new_link) session.commit() - else: - # Make sure linknet object is not added to session because of foreign key load - session.expunge(new_link) # Make return data pretty ret_dict = { **new_link.as_dict(),