mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-08-27 12:30:13 +03:00
Fix double deletion issue in remove_resource_from_pool
Remove duplicate delete_resource call from remove_resource_from_pool since the API layer already handles resource deletion. This prevents conflicts where the API layer tries to delete a resource that was already deleted by the repository layer. The complete fix is now: - remove_resource_from_pool: Only removes resource from pool (API handles deletion) - delete_resource_pool: Deletes all resource records before deleting pool
This commit is contained in:
parent
d2848a600e
commit
f3aaa902c6
@ -212,8 +212,6 @@ class ResourcePoolsRepository(BaseRepository):
|
||||
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]:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user