diff --git a/app/dao/notifications_dao.py b/app/dao/notifications_dao.py index bc617f224..5654051e2 100644 --- a/app/dao/notifications_dao.py +++ b/app/dao/notifications_dao.py @@ -447,10 +447,9 @@ def dao_update_notifications_sent_to_dvla(job_id, provider): updated_count = db.session.query(Notification ).filter(Notification.job_id == job_id ).update({'status': 'sending', "sent_by": provider}) - # only update NotificationHistory if api key typ is not test + db.session.query(NotificationHistory - ).filter(NotificationHistory.job_id == job_id, - NotificationHistory.key_type != KEY_TYPE_TEST + ).filter(NotificationHistory.job_id == job_id ).update({'status': 'sending', "sent_by": provider}) return updated_count