Commits

Gustavo Picon  committed c139fcc

Wasn't handling non-int page parameters correctly

  • Participants
  • Parent commits 0845ed3

Comments (0)

Files changed (1)

File feedjack/fjlib.py

     """ Returns the context dictionary for a page view.
     """
     sfeeds_obj, sfeeds_ids = sfeeds
-    page = int(request.GET.get('page', 0))
+    try:
+        page = int(request.GET.get('page', 0))
+    except ValueError:
+        page = 0
     paginator, object_list = get_paginator(site, sfeeds_ids, \
       page=page, tag=tag, user=user_id)
     if object_list: