[snowy] Correct thinko that prevented note viewing



commit a6fa9bd72b2becc07e838ae1a4d7125a53ba7a5b
Author: Brad Taylor <brad getcoded net>
Date:   Tue Jul 21 11:54:54 2009 -0400

    Correct thinko that prevented note viewing
    
    Closes: #588526

 api/handlers.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/api/handlers.py b/api/handlers.py
index 6cac237..9e2fd6c 100644
--- a/api/handlers.py
+++ b/api/handlers.py
@@ -176,9 +176,9 @@ class NoteHandler(BaseHandler):
     model = Note
 
     @catch_and_return(ObjectDoesNotExist, rc.NOT_HERE)
-    def read(self, request, username, note_id, slug):
+    def read(self, request, username, note_id):
         author = User.objects.get(username=username)
-        note = Note.objects.get(pk=note_id, slug=slug)
+        note = Note.objects.get(pk=note_id, author=author)
         if request.user != author and note.permissions == 0:
             return rc.FORBIDDEN
         return {'note': [describe_note(note)]}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]