From 29200fc58b87dd26a4236aac689b73d35748c1a6 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 31 Jan 2021 15:53:59 +0100 Subject: [PATCH] use id from settings, no need for db lookup --- 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 ef18dd1..3037245 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().id): + for a in Annotation.query.filter_by(item_id=self.id, user_id=settings.USER_ID): a.add_record('removeannotation') a.delete()