diff --git a/oml/item/models.py b/oml/item/models.py index 508f46e..ef18dd1 100644 --- a/oml/item/models.py +++ b/oml/item/models.py @@ -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()