Changeset - 728fbb693183
[Not reviewed]
default
0 1 0
Marcin Kuzminski - 15 years ago 2010-08-30 17:38:38
marcin@python-works.com
fixed bug in summary graph
1 file changed with 2 insertions and 5 deletions:
0 comments (0 inline, 0 general)
pylons_app/controllers/summary.py
Show inline comments
 
@@ -65,31 +65,28 @@ class SummaryController(BaseController):
 

	
 
        c.commit_data = self.__get_commit_stats(c.repo_info)
 
        
 
        return render('summary/summary.html')
 

	
 

	
 

	
 
    def __get_commit_stats(self, repo):
 
        aggregate = OrderedDict()
 
        
 
        #graph range
 
        td = datetime.today() + timedelta(days=1) 
 
        y = td.year
 
        m = td.month
 
        d = td.day
 
        c.ts_min = mktime((y, (td - timedelta(days=calendar.mdays[m] - 1)).month,
 
        y, m, d = td.year, td.month, td.day
 
        c.ts_min = mktime((y, (td - timedelta(days=calendar.mdays[m])).month,
 
                            d, 0, 0, 0, 0, 0, 0,))
 
        c.ts_max = mktime((y, m, d, 0, 0, 0, 0, 0, 0,))
 

	
 
        
 
        def author_key_cleaner(k):
 
            k = person(k)
 
            k = k.replace('"', "'") #for js data compatibilty
 
            return k
 
                
 
        for cs in repo[:200]:#added limit 200 until fix #29 is made
 
            k = '%s-%s-%s' % (cs.date.timetuple()[0], cs.date.timetuple()[1],
 
                              cs.date.timetuple()[2])
 
            timetupple = [int(x) for x in k.split('-')]
 
            timetupple.extend([0 for _ in xrange(6)])
 
            k = mktime(timetupple)
0 comments (0 inline, 0 general)