fix(storage): Prevent AttributeError when closing uninitialized Postgres engine

This commit is contained in:
Bruno Domingues
2026-08-04 14:57:52 -03:00
parent 35efb67c89
commit 773c980fc3

View File

@@ -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)