From 0e11f04d4495f387ab769b80bfdaa0909008f026 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 13 Oct 2019 11:16:33 +0100 Subject: [PATCH] pass id, don't depend on cast --- oml/item/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()