Apply fix from PR #2315: delete resource from resource table when removing from pool

This commit is contained in:
YueGuobin 2026-06-01 12:30:03 +08:00
parent 18eb3d9c48
commit fcb76a4b01
No known key found for this signature in database

View File

@ -203,6 +203,9 @@ class ResourcePoolsRepository(BaseRepository):
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]: