mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -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:
@@ -31,7 +31,7 @@ def timeout_job_counts(notifications_type, timeout_start):
|
||||
results = db.session.query(
|
||||
JobStatistics.job_id.label('job_id'),
|
||||
func.count(Notification.status).label('count'),
|
||||
Notification.status.label('status')
|
||||
Notification.status
|
||||
).filter(
|
||||
Notification.notification_type == notifications_type,
|
||||
JobStatistics.job_id == Notification.job_id,
|
||||
|
||||
Reference in New Issue
Block a user