cleanup sort/find table
This commit is contained in:
parent
be1c4085f2
commit
54f301ff71
2 changed files with 4 additions and 0 deletions
|
|
@ -105,6 +105,8 @@ class Item(db.Model):
|
|||
Sort.query.filter(Sort.item_id.in_(ids)).delete(synchronize_session=False)
|
||||
cls.query.filter(cls.id.in_(ids)).delete(synchronize_session=False)
|
||||
state.db.session.expire_all()
|
||||
Sort.query.filter_by(item_id=None).delete()
|
||||
Find.query.filter_by(item_id=None).delete()
|
||||
|
||||
@classmethod
|
||||
def remove_without_user(cls):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue