fix filter_by

This commit is contained in:
Renaud Boyer 2020-12-07 10:38:19 +01:00
parent 7838ff3224
commit df565bca1c
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ def delete_refused_emails():
def notify_premium_end(): def notify_premium_end():
"""sent to user who has canceled their subscription and who has their subscription ending soon""" """sent to user who has canceled their subscription and who has their subscription ending soon"""
for sub in Subscription.query.filter(cancelled=True).all(): for sub in Subscription.query.filter_by(cancelled=True).all():
if ( if (
arrow.now().shift(days=3).date() arrow.now().shift(days=3).date()
> sub.next_bill_date > sub.next_bill_date