#393 properly checking if user is anonymous
authorBryan <btbonval@gmail.com>
Tue, 27 Jan 2015 19:09:39 +0000 (14:09 -0500)
committerBryan <btbonval@gmail.com>
Tue, 27 Jan 2015 19:09:39 +0000 (14:09 -0500)
karmaworld/apps/notes/gdrive.py

index 3c55c8779a79e1257440dc057f56d723844be291..2ebd531292482fc341afb850b28bab019bdd9f82 100644 (file)
@@ -240,7 +240,7 @@ def convert_raw_document(raw_document, user=None):
 
     # If we know the user who uploaded this,
     # associate them with the note
-    if user:
+    if user and not user.is_anonymous():
         note.user = user
         NoteKarmaEvent.create_event(user, note, NoteKarmaEvent.UPLOAD)
     else: