# HG changeset patch # User Marcin Kuzminski # Date 2012-07-18 15:59:51 # Node ID 4548912f48c83aa5bcdab3949bf61f1b54d572eb # Parent 6bd62617b99f317323da95f490b41cbffc8b5626 fixes issue #502, float division error on setting maxsize of changelog to 0 diff --git a/rhodecode/controllers/changelog.py b/rhodecode/controllers/changelog.py --- a/rhodecode/controllers/changelog.py +++ b/rhodecode/controllers/changelog.py @@ -64,7 +64,8 @@ class ChangelogController(BaseRepoContro session.save() else: 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)) branch_name = request.params.get('branch', None) try: