Skip to content

Commit

Permalink
oops; fix stupid bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fin committed Mar 1, 2013
1 parent a94f403 commit b4557bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lfluxproject/lstory/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ def tumbleposts(self):
return posts

@classmethod
def summarize_period(cls, start_date, end_date):
summaries = cls.objects.filter(revision_date__lte=end_date)
def summarize_period(cls, story, start_date, end_date):
summaries = cls.objects.filter(revision_date__lte=end_date, story=story)
if start_date:
summaries = summaries.filter(revision_date__gte=start_date)
posts = reduce(set.union, [set(x.tumbleposts()) for x in summaries], set())
Expand Down
2 changes: 1 addition & 1 deletion lfluxproject/lsubscribe/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def confirm_link(self):

def send_email(self):
now = datetime.now()
summary = StorySummary.summarize_period(self.last_delivery, now).strip()
summary = StorySummary.summarize_period(self.content_object, self.last_delivery, now).strip()

if not summary:
print 'no updates for summary %s' % self.pk
Expand Down

0 comments on commit b4557bf

Please sign in to comment.