mirror of
https://git.collinwebdesigns.de/oscar.krause/fastapi-dls.git
synced 2024-11-23 15:31:00 +03:00
sql query improvements
This commit is contained in:
parent
e4e6387b2a
commit
fa2c06972e
@ -66,7 +66,7 @@ class Origin(Base):
|
|||||||
if origin_refs is None:
|
if origin_refs is None:
|
||||||
deletions = session.query(Origin).delete()
|
deletions = session.query(Origin).delete()
|
||||||
else:
|
else:
|
||||||
deletions = session.query(Origin).filter(Origin.origin_ref in origin_refs).delete()
|
deletions = session.query(Origin).filter(Origin.origin_ref.in_(origin_refs)).delete()
|
||||||
session.commit()
|
session.commit()
|
||||||
session.close()
|
session.close()
|
||||||
return deletions
|
return deletions
|
||||||
|
Loading…
Reference in New Issue
Block a user