From ac96a0f4a19a1841a8014afd67a3eaaabdc8b509 Mon Sep 17 00:00:00 2001 From: Sylvain MATHIEU OBS Date: Mon, 25 Sep 2023 15:02:07 +0200 Subject: [PATCH] delete also resource from resource table when delete a resource from resource pool --- gns3server/db/repositories/pools.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gns3server/db/repositories/pools.py b/gns3server/db/repositories/pools.py index 5f3f259de..ff95fc0fd 100644 --- a/gns3server/db/repositories/pools.py +++ b/gns3server/db/repositories/pools.py @@ -191,6 +191,9 @@ async def remove_resource_from_pool( resource_pool_db.resources.remove(resource) await self._db_session.commit() await self._db_session.refresh(resource_pool_db) + + await self.delete_resource(resource.resource_id) + return resource_pool_db async def get_pool_resources(self, resource_pool_id: UUID) -> List[models.Resource]: