Fix query for fetching promotion schedule by user.

The general query worked fine but passing an author_id raised an error.
This commit is contained in:
shlurbee
2012-07-16 02:23:04 -07:00
parent 7abbac6e25
commit aff7c460aa

View File

@@ -536,7 +536,7 @@ class PromotionWeights(Sessionized, Base):
q = q.filter(and_(cls.date >= start_date, cls.date < end_date))
if author_id is not None:
q.filter(author_id = author_id)
q = q.filter(cls.account_id == author_id)
res = {}
for x in q.all():