diff --git a/workers/notificationworker.py b/workers/notificationworker.py index 6c99e84d6..3d3e2f80f 100644 --- a/workers/notificationworker.py +++ b/workers/notificationworker.py @@ -7,7 +7,7 @@ from endpoints.notificationevent import NotificationEvent, InvalidNotificationEv from workers.queueworker import QueueWorker, JobException from data import model -from data.database import RepositoryNotification +from data.model import InvalidNotificationException logger = logging.getLogger(__name__) @@ -17,7 +17,7 @@ class NotificationWorker(QueueWorker): try: notification = model.notification.get_repo_notification(notification_uuid) - except RepositoryNotification.DoesNotExist: + except InvalidNotificationException: # Probably deleted. return