From: Ross Jones Date: Wed, 23 Jan 2013 12:55:50 +0000 Subject: Merge branch 'master' of github.com:datagovuk/ckanext-ga-report X-Git-Url: http://maxious.lambdacomplex.org/git/?p=ckanext-ga-report.git&a=commitdiff&h=0d4a4de854650c0d3d9d851935bf3d8b96fc4761 --- Merge branch 'master' of github.com:datagovuk/ckanext-ga-report --- --- a/ckanext/ga_report/ga_model.py +++ b/ckanext/ga_report/ga_model.py @@ -227,7 +227,7 @@ stores them in GA_Url under the period and recalculates the totals for the 'All' period. ''' - progress_total = len(progress_data) + progress_total = len(url_data) progress_count = 0 for url, views, visits in url_data: progress_count += 1 --- a/ckanext/ga_report/helpers.py +++ b/ckanext/ga_report/helpers.py @@ -106,6 +106,10 @@ for entry in entries: if len(datasets) < count: p = model.Package.get(entry.url[len('/dataset/'):]) + if not p: + _log.warning("Could not find Package for {url}".format(url=entry.url)) + continue + if not p in datasets: datasets[p] = {'views':0, 'visits': 0} datasets[p]['views'] = datasets[p]['views'] + int(entry.pageviews) --- a/ckanext/ga_report/templates/ga_report/notes.html +++ b/ckanext/ga_report/templates/ga_report/notes.html @@ -7,7 +7,7 @@

Notes