Make sure note user exists
authorCharles Connell <charles@connells.org>
Fri, 24 Jan 2014 17:44:19 +0000 (12:44 -0500)
committerCharles Connell <charles@connells.org>
Fri, 24 Jan 2014 17:44:19 +0000 (12:44 -0500)
karmaworld/apps/notes/views.py

index 5093b27b0408e8263e8808aa2f3fd05bb2b6c4b8..ad9b1e6258eaa1003472d16bfa0095eff3d5876d 100644 (file)
@@ -259,6 +259,7 @@ def process_downloaded_note(request_user, note):
     """Record that somebody has downloaded a note"""
     if request_user.is_authenticated() and request_user != note.user:
         NoteKarmaEvent.create_event(request_user, note, NoteKarmaEvent.DOWNLOADED_NOTE)
+    if request_user.is_authenticated() and note.user:
         NoteKarmaEvent.create_event(note.user, note, NoteKarmaEvent.HAD_NOTE_DOWNLOADED)