From f8f207ed9997e9133baea7926e79014bd1bb0918 Mon Sep 17 00:00:00 2001 From: kotzilla Date: Wed, 17 Dec 2014 11:32:06 +0000 Subject: [PATCH] Another note button bug --- exposition/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exposition/views.py b/exposition/views.py index 4c019d58..7219441f 100644 --- a/exposition/views.py +++ b/exposition/views.py @@ -409,8 +409,8 @@ def add_note(request, slug): ct = ContentType.objects.get_for_model(e) object_id = e.id user = request.user - if Note.objects.filter(user=user, content_type=ct, object_id=object_id).exists(): - Note.objects.filter(user=user, content_type=ct, object_id=object_id).update(text=text) + if Note.objects.filter(user__id=user.id, content_type=ct, object_id=object_id).exists(): + Note.objects.filter(user__id=user.id, content_type=ct, object_id=object_id).update(text=text) else: Note.objects.create(content_type=ct, object_id=object_id, user=user, text=text)