mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 23:41:17 -05:00
Fixed bug where I forgot to update only the right job :-(
This commit is contained in:
@@ -6,7 +6,9 @@ from sqlalchemy import desc
|
||||
|
||||
def dao_create_notification(notification):
|
||||
if notification.job_id:
|
||||
db.session.query(Job).update({Job.notifications_sent: Job.notifications_sent + 1})
|
||||
db.session.query(Job).filter_by(
|
||||
id=notification.job_id
|
||||
).update({Job.notifications_sent: Job.notifications_sent + 1})
|
||||
db.session.add(notification)
|
||||
db.session.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user