Admin/repositories returns HTTP 500

Issue #853 resolved
Lee Loucks created an issue

Selecting the menu item "repositories" from the Admin menu returns an HTTP 500.

Steps to reproduce:

  • create a new repository but do not push any change sets to it.
  • select Admin/repositories
  • RC returns HTTP/500

Problem:

  • There is no previous change for RC to extract a commit date for, so prevdate is None which causes the age function in utils2.py to blow up.

Fix/Patch:

I'm not sure if this would be how you want to handle it, but this at least renders the page.

--- rhodecode/lib/utils2.py.orig
+++ rhodecode/lib/utils2.py
@@ -357,6 +357,9 @@
     :rtype: unicode
     :returns: unicode words describing age
     """
+    if not prevdate:
+        return _(u'No previous date')
+
    order = ['year', 'month', 'day', 'hour', 'minute', 'second']
    deltas = {}
    future = False

Comments (3)

  1. Log in to comment