# HG changeset patch # User Mads Kiilerich # Date 2015-09-25 14:18:44 # Node ID 4ca5818a2ff41793d22e3b56b0ecb6260e73a0f6 # Parent 4e9f5ef98dc492676edc9642f5ba23162919c868 summary: add missing c.stats_percentage initialization that caused crash on empty repos diff --git a/kallithea/controllers/summary.py b/kallithea/controllers/summary.py --- a/kallithea/controllers/summary.py +++ b/kallithea/controllers/summary.py @@ -195,6 +195,7 @@ class SummaryController(BaseRepoControll 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)