# HG changeset patch # User Marcin Kuzminski # Date 2010-11-18 01:48:04 # Node ID cda88b3eb09c9e59bcb79101ce560d56859a7b68 # Parent e2f3c8e6939db927047b2113b2108e7eea6dd3ee fixed error for empty revisions on admin repo edit diff --git a/rhodecode/controllers/admin/repos.py b/rhodecode/controllers/admin/repos.py --- a/rhodecode/controllers/admin/repos.py +++ b/rhodecode/controllers/admin/repos.py @@ -231,7 +231,7 @@ class ReposController(BaseController): try: ScmModel().mark_for_invalidation(repo_name) except Exception, e: - h.flash(_('An error occured during cache invalidation'), + h.flash(_('An error occurred during cache invalidation'), category='error') return redirect(url('edit_repo', repo_name=repo_name)) @@ -251,7 +251,9 @@ class ReposController(BaseController): else: last_rev = 0 c.stats_revision = last_rev - c.repo_last_rev = ScmModel().get(repo_name).revisions[-1] + r = ScmModel().get(repo_name) + c.repo_last_rev = r.revisions[-1] if r.revisions else 0 + if last_rev == 0: c.stats_percentage = 0 else: