Skip to content

Commit

Permalink
Correct empty response values
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Sep 19, 2012
1 parent 974b74c commit d3eeca4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/sentry/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ def time_limit(silence): # ~ 3600 per hour
class ChartMixin(object):
def get_chart_data_for_group(self, instances, max_days=90, key=None):
if not instances:
return []
if key is None:
return []
return {}

if hasattr(instances[0], '_state'):
db = instances[0]._state.db or 'default'
Expand All @@ -334,7 +336,9 @@ def get_chart_data(self, instance, max_days=90, key=None):

def _get_chart_data(self, queryset, max_days=90, db='default', key=None):
if not has_charts(db):
return []
if key is None:
return []
return {}

today = timezone.now().replace(microsecond=0, second=0)

Expand Down

0 comments on commit d3eeca4

Please sign in to comment.