mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-02 21:28:10 +00:00
delete also resource from resource table when delete a resource from resource pool
This commit is contained in:
parent
0d834ee2a0
commit
ac96a0f4a1
@ -191,6 +191,9 @@ class ResourcePoolsRepository(BaseRepository):
|
|||||||
resource_pool_db.resources.remove(resource)
|
resource_pool_db.resources.remove(resource)
|
||||||
await self._db_session.commit()
|
await self._db_session.commit()
|
||||||
await self._db_session.refresh(resource_pool_db)
|
await self._db_session.refresh(resource_pool_db)
|
||||||
|
|
||||||
|
await self.delete_resource(resource.resource_id)
|
||||||
|
|
||||||
return resource_pool_db
|
return resource_pool_db
|
||||||
|
|
||||||
async def get_pool_resources(self, resource_pool_id: UUID) -> List[models.Resource]:
|
async def get_pool_resources(self, resource_pool_id: UUID) -> List[models.Resource]:
|
||||||
|
Loading…
Reference in New Issue
Block a user