fix: add session rollback in DELETE
All checks were successful
Component testing / Hub testing (push) Successful in 17s
Component testing / Store testing (push) Successful in 28s
Component testing / Integration smoke testing (push) Successful in 2m44s

This commit is contained in:
ІМ-24 Владислав Коваленко
2026-03-26 15:59:57 +00:00
parent 1bf5687505
commit c553384ce7

View File

@@ -237,6 +237,11 @@ def delete_processed_agent_data(processed_agent_data_id: int):
return ProcessedAgentDataInDB(**result._mapping)
except Exception as err:
session.rollback()
print(f"Database error: {err}")
raise HTTPException(status_code=500, detail="Internal Server Error")
finally:
session.close()