fix(storage): Prevent AttributeError when closing uninitialized Postgres engine
This commit is contained in:
@@ -202,6 +202,7 @@ class Storage(Postgres, MinioManager):
|
||||
|
||||
def close(self) -> None:
|
||||
"""Close Storage resources (MinIO client and Postgres engine)."""
|
||||
if hasattr(self, 'engine'):
|
||||
Postgres.close(self)
|
||||
MinioManager.close(self)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user