diff rhodecode/controllers/changelog.py @ 2854:d998cc84cf72 rhodecode-0.0.1.4.2

Merge branch beta into stable
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 19 Sep 2012 22:38:12 +0200
parents 63e58ef80ef1 6b176c679896
children 3563bb7b4b82
line wrap: on
line diff
--- a/rhodecode/controllers/changelog.py	Sat Sep 08 00:39:00 2012 +0200
+++ b/rhodecode/controllers/changelog.py	Wed Sep 19 22:38:12 2012 +0200
@@ -37,6 +37,7 @@
 from rhodecode.lib.compat import json
 from rhodecode.lib.graphmod import _colored, _dagwalker
 from rhodecode.lib.vcs.exceptions import RepositoryError, ChangesetDoesNotExistError
+from rhodecode.lib.utils2 import safe_int
 
 log = logging.getLogger(__name__)
 
@@ -65,7 +66,7 @@
             c.size = int(session.get('changelog_size', default))
         # min size must be 1
         c.size = max(c.size, 1)
-        p = int(request.params.get('page', 1))
+        p = safe_int(request.params.get('page', 1), 1)
         branch_name = request.params.get('branch', None)
         try:
             if branch_name: