cleanup scrape before removing book
This commit is contained in:
parent
a24061518a
commit
909e38c302
1 changed files with 1 additions and 0 deletions
|
@ -228,6 +228,7 @@ class Item(db.Model):
|
||||||
def delete(self, commit=True):
|
def delete(self, commit=True):
|
||||||
Sort.query.filter_by(item_id=self.id).delete()
|
Sort.query.filter_by(item_id=self.id).delete()
|
||||||
Transfer.query.filter_by(item_id=self.id).delete()
|
Transfer.query.filter_by(item_id=self.id).delete()
|
||||||
|
Scrape.query.filter_by(item_id=self.id).delete()
|
||||||
state.db.session.delete(self)
|
state.db.session.delete(self)
|
||||||
if commit:
|
if commit:
|
||||||
state.db.session.commit()
|
state.db.session.commit()
|
||||||
|
|
Loading…
Reference in a new issue