forked from oscar.krause/fastapi-dls
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