mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-03 07:00:44 -05:00
Rename class to be singular
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -946,7 +946,7 @@ class Event(db.Model):
|
||||
data = db.Column(JSON, nullable=False)
|
||||
|
||||
|
||||
class Rates(db.Model):
|
||||
class Rate(db.Model):
|
||||
__tablename__ = 'rates'
|
||||
|
||||
id = db.Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
|
||||
Reference in New Issue
Block a user