Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

*Should be subtracting two dates and then computing the days

  • Loading branch information...
commit 1fa1d9423496edacd8ab5957d3853a47ab16b3a6 1 parent e15e5e7
David Cramer authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django_histograms/utils.py
View
2  django_histograms/utils.py
@@ -100,7 +100,7 @@ def get_report(self):
elif self.days:
cutoff = datetime.datetime.now()-datetime.timedelta(days=self.days)
grouper = lambda x: None
- day_grouper = lambda x: (datetime.datetime.now()-datetime.timedelta(days=x.day)).days
+ day_grouper = lambda x: (datetime.datetime.now()-x).days
months[None] = ['Last %s Days' % (self.days), ([0] * self.days), 0]
qs = self.get_query_set().values(self.attname).annotate(
Please sign in to comment.
Something went wrong with that request. Please try again.