Changeset - 4ca5818a2ff4
[Not reviewed]
stable
0 1 0
Mads Kiilerich - 10 years ago 2015-09-25 14:18:44
madski@unity3d.com
summary: add missing c.stats_percentage initialization that caused crash on empty repos
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/summary.py
Show inline comments
 
@@ -192,12 +192,13 @@ class SummaryController(BaseRepoControll
 
        c.ts_min = ts_min_m
 
        c.ts_max = ts_max_y
 

	
 
        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)
 
            c.commit_data = stats.commit_activity
 
            c.overview_data = stats.commit_activity_combined
 

	
0 comments (0 inline, 0 general)