Commit 89492339c3143ec209a7af562848107c0db4b2d1

Authored by Andrew Buss
1 parent 90df9a55c8
Exists in master

check if attr exists

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

flashcards/models.py View file @ 8949233
... ... @@ -320,7 +320,7 @@
320 320 :param user:
321 321 :return: Whether the card is hidden from the user.
322 322 """
323   - if self.is_not_hidden: return False
  323 + if hasattr(self, 'is_not_hidden') and self.is_not_hidden: return False
324 324 return self.is_hidden or self.flashcardhide_set.filter(user=user).exists()
325 325  
326 326 def is_in_deck(self, user):