Anonymous committed 74cb65c

fix. of course there is no revision if snippet don't exist ...

Comments (0)

Files changed (1)


 def view_revisions(request, id):
     snippet, revisions = Paste.with_revisions(local.db, id, request.values.get('rev'))
+    if snippet is None:
+        raise NotFound
     revisions = [snippet] + revisions
-    print revisions
     revisions_ = []
     if revisions and revisions is not None:
         revisions_ = [rev._data for rev in revisions] 
     if 'application/json' in request.accept_mimetypes:
         return send_json(revisions_)
-    if snippet is None:
-        raise NotFound
     return render_response('paste/revisions.html', snippet=snippet, revisions=revisions_)