From aff7c460aa04039b6819f28333d3ef1d5f113cd6 Mon Sep 17 00:00:00 2001 From: shlurbee Date: Mon, 16 Jul 2012 02:23:04 -0700 Subject: [PATCH] Fix query for fetching promotion schedule by user. The general query worked fine but passing an author_id raised an error. --- r2/r2/models/bidding.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r2/r2/models/bidding.py b/r2/r2/models/bidding.py index f4c1a0516..52248b598 100644 --- a/r2/r2/models/bidding.py +++ b/r2/r2/models/bidding.py @@ -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():