From: David Read Date: Fri, 19 Apr 2013 19:06:52 +0000 Subject: Merge branch 'stable' of github.com:datagovuk/ckanext-ga-report X-Git-Url: http://maxious.lambdacomplex.org/git/?p=ckanext-ga-report.git&a=commitdiff&h=e9fa3effd2a57e94d99130e37d4b92595f60400b --- Merge branch 'stable' of github.com:datagovuk/ckanext-ga-report --- --- a/ckanext/ga_report/controller.py +++ b/ckanext/ga_report/controller.py @@ -450,10 +450,11 @@ data.append(series) # Overwrite data with a set of interesting series others = [ x for x in raw_data if not (x in data) ] - data.append({ - 'name':'Other', - 'data': [ {'x':x,'y':y} for x,y in get_totals(others).items() ] - }) + if len(others): + data.append({ + 'name':'Other', + 'data': [ {'x':x,'y':y} for x,y in get_totals(others).items() ] + }) # Turn each point into a percentage for series in data: for point in series['data']: