Mercurial > kallithea
changeset 5521:4ca5818a2ff4 stable
summary: add missing c.stats_percentage initialization that caused crash on empty repos
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 25 Sep 2015 14:18:44 +0200 |
parents | 4e9f5ef98dc4 |
children | 092ea4d40d60 |
files | kallithea/controllers/summary.py |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/controllers/summary.py Fri Sep 25 14:18:44 2015 +0200 +++ b/kallithea/controllers/summary.py Fri Sep 25 14:18:44 2015 +0200 @@ -195,6 +195,7 @@ stats = self.sa.query(Statistics)\ .filter(Statistics.repository == c.db_repo)\ .scalar() + c.stats_percentage = 0 if stats and stats.languages: c.no_data = False is c.db_repo.enable_statistics lang_stats_d = json.loads(stats.languages)