pass id, don't depend on cast

This commit is contained in:
j 2019-10-13 11:16:33 +01:00
parent 45fb954164
commit 0e11f04d44

View file

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