Fix notification system to use the new tuple correctly

This commit is contained in:
Joseph Schorr 2017-07-13 22:43:26 +03:00
parent 9f4ffca736
commit bf3e941d7f
5 changed files with 28 additions and 72 deletions

View file

@ -15,6 +15,8 @@ from endpoints.notificationmethod import (NotificationMethod,
CannotValidateNotificationMethodException)
from endpoints.notificationhelper import build_notification_data
from data import model
from workers.notificationworker.models_pre_oci import notification
logger = logging.getLogger(__name__)
def notification_view(note):
@ -191,7 +193,8 @@ class TestRepositoryNotification(RepositoryParamResource):
raise NotFound()
event_info = NotificationEvent.get_event(test_note.event.name)
sample_data = event_info.get_sample_data(test_note)
sample_data = event_info.get_sample_data(notification(test_note))
notification_data = build_notification_data(test_note, sample_data)
notification_queue.put([test_note.repository.namespace_user.username, repository,
test_note.event.name], json.dumps(notification_data))