mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2024-11-22 06:18:48 +00:00
fixes
This commit is contained in:
parent
1b34edfda6
commit
c38ed25a2f
@ -101,7 +101,7 @@ class Lease(Base):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def cleanup(engine: Engine, origin_ref: str) -> int:
|
def cleanup(engine: Engine, origin_ref: str) -> int:
|
||||||
session = sessionmaker(autocommit=True, autoflush=True, bind=engine)()
|
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()
|
session.close()
|
||||||
return deletions
|
return deletions
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user