From 7407bca7282086f1155a064526f6316aaf02c59d Mon Sep 17 00:00:00 2001 From: Matt Jibson Date: Mon, 17 Aug 2015 17:54:33 -0400 Subject: [PATCH] Correct fix for notification get repo The fix in #366 was wrong. Not sure how I tested it and it worked. --- workers/notificationworker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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