mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2024-12-28 08:34:04 +00:00
fixes
This commit is contained in:
parent
1b34edfda6
commit
c38ed25a2f
@ -101,7 +101,7 @@ class Lease(Base):
|
||||
@staticmethod
|
||||
def cleanup(engine: Engine, origin_ref: str) -> int:
|
||||
session = sessionmaker(autocommit=True, autoflush=True, bind=engine)()
|
||||
deletions = session.query(Lease).delete(Lease.origin_ref == origin_ref)
|
||||
deletions = session.query(Lease).filter(Lease.origin_ref == origin_ref).delete()
|
||||
session.close()
|
||||
return deletions
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user