From: Charles Connell Date: Fri, 24 Jan 2014 17:44:19 +0000 (-0500) Subject: Make sure note user exists X-Git-Tag: release-20150131~202 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e84d4b235afc9384665353249e91169b35be4feb;p=oweals%2Fkarmaworld.git Make sure note user exists --- diff --git a/karmaworld/apps/notes/views.py b/karmaworld/apps/notes/views.py index 5093b27..ad9b1e6 100644 --- a/karmaworld/apps/notes/views.py +++ b/karmaworld/apps/notes/views.py @@ -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)