From 89492339c3143ec209a7af562848107c0db4b2d1 Mon Sep 17 00:00:00 2001 From: Andrew Buss Date: Tue, 2 Jun 2015 08:46:08 -0700 Subject: [PATCH] check if attr exists --- flashcards/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flashcards/models.py b/flashcards/models.py index d4f4fae..557bbb3 100644 --- a/flashcards/models.py +++ b/flashcards/models.py @@ -320,7 +320,7 @@ class Flashcard(Model): :param user: :return: Whether the card is hidden from the user. """ - if self.is_not_hidden: return False + if hasattr(self, 'is_not_hidden') and self.is_not_hidden: return False return self.is_hidden or self.flashcardhide_set.filter(user=user).exists() def is_in_deck(self, user): -- 1.9.1