clear cover/preview cache on delete

This commit is contained in:
j 2016-01-16 16:27:52 +05:30
parent 1d6e94d1a6
commit 59894b0df7

View file

@ -255,6 +255,8 @@ class Item(db.Model):
Transfer.query.filter_by(item_id=self.id).delete()
Scrape.query.filter_by(item_id=self.id).delete()
state.db.session.delete(self)
icons.clear('cover:%s' % self.id)
icons.clear('preview:%s' % self.id)
if commit:
state.db.session.commit()