Don't do anything if the query doesn't yield results.

This commit is contained in:
Rebecca Law
2019-05-01 15:07:59 +01:00
parent 0def0b7fd0
commit c9265aab68

View File

@@ -395,6 +395,7 @@ def insert_update_notification_history(notification_type, date_to_delete_from, s
Notification.key_type != KEY_TYPE_TEST Notification.key_type != KEY_TYPE_TEST
).all() ).all()
if notifications:
stmt = insert(NotificationHistory).values( stmt = insert(NotificationHistory).values(
notifications notifications
) )