Commit c72fc64b8b0ab012145888678b2e431d1093dfea

Authored by Andrew Buss
1 parent 4e105f55eb
Exists in master

allow a user to hide a card twice - the second reason overwrites the original

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

flashcards/models.py View file @ c72fc64
... ... @@ -354,7 +354,8 @@
354 354  
355 355 flashcards.pushes.push_deck_event('card_hidden', self, user)
356 356 if self.is_in_deck(user): user.unpull(self)
357   - hide, created = FlashcardHide.objects.get_or_create(user=user, flashcard=self, reason=reason)
  357 + hide, created = FlashcardHide.objects.get_or_create(user=user, flashcard=self)
  358 + hide.reason = reason
358 359 hide.save()
359 360  
360 361 def unhide_by_user(self, user, reason=None):