mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
Remove Notification, NotificationHistory status labels:
Replace labels by adding a key kwarg in the model for status. We still need this as sqlalchemy attmempts to look for `notification_status` on the model (Notification/NotificationHistory). To achieve true ORM mapping (map status -> notification_status) we need the key kwarg. More here: http://docs.sqlalchemy.org/en/latest/core/metadata.html#sqlalchemy.schema.Column#key
This commit is contained in:
@@ -17,7 +17,7 @@ from app.statsd_decorators import statsd
|
||||
def dao_get_notification_outcomes_for_job(service_id, job_id):
|
||||
query = db.session.query(
|
||||
func.count(NotificationHistory.status).label('count'),
|
||||
NotificationHistory.status.label('status')
|
||||
NotificationHistory.status
|
||||
)
|
||||
|
||||
return query \
|
||||
|
||||
Reference in New Issue
Block a user