From 38578763acbe11d798bcce1f8ce842dd657170a1 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 26 May 2016 11:03:22 +0200 Subject: Fix logout (refs #3102) --- archaeological_finds/models.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'archaeological_finds') diff --git a/archaeological_finds/models.py b/archaeological_finds/models.py index 43c18828c..9c972f68c 100644 --- a/archaeological_finds/models.py +++ b/archaeological_finds/models.py @@ -386,6 +386,8 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem): @classmethod def get_owns(cls, user): + if user.is_anonymous(): + return FindBasket.objects.none() return FindBasket.objects.filter(user=user) def get_first_base_find(self): -- cgit v1.2.3