Rename class to be singular

This commit is contained in:
Rebecca Law
2017-04-25 09:53:43 +01:00
parent 266c17dfd6
commit 6c8ff80440
2 changed files with 6 additions and 6 deletions

View File

@@ -1,11 +1,11 @@
from sqlalchemy import desc
from app import db
from app.models import Rates
from app.models import Rate
def get_rate_for_type_and_date(notification_type, date_sent):
return db.session.query(Rates).filter(Rates.notification_type == notification_type,
Rates.valid_from <= date_sent
).order_by(Rates.valid_from.desc()
).limit(1).first()
return db.session.query(Rate).filter(Rate.notification_type == notification_type,
Rate.valid_from <= date_sent
).order_by(Rate.valid_from.desc()
).limit(1).first()