use id from settings, no need for db lookup

This commit is contained in:
j 2021-01-31 15:53:59 +01:00
parent 6c39ae2c7b
commit 29200fc58b

View file

@ -322,7 +322,7 @@ class Item(db.Model):
def remove_annotations(self): def remove_annotations(self):
from annotation.models import Annotation from annotation.models import Annotation
for a in Annotation.query.filter_by(item_id=self.id, user_id=state.user().id): for a in Annotation.query.filter_by(item_id=self.id, user_id=settings.USER_ID):
a.add_record('removeannotation') a.add_record('removeannotation')
a.delete() a.delete()