Fixes various issues. (#316)

This commit is contained in:
kevgliss
2016-05-13 14:35:38 -07:00
parent a0c8765588
commit 58e8fe0bd0
26 changed files with 72 additions and 86 deletions

View File

@ -273,7 +273,7 @@ def update(notification_id, label, options, description, active, certificates):
notification.options = options
notification.description = description
notification.active = active
notification = database.update_list(notification, 'certificates', Certificate, certificates)
notification.certificates = certificates
return database.update(notification)

View File

@ -335,7 +335,7 @@ class Notifications(AuthenticatedResource):
return service.update(
notification_id,
data['label'],
data['notificationOptions'],
data['plugin']['plugin_options'],
data['description'],
data['active'],
data['certificates']
@ -352,7 +352,7 @@ class CertificateNotifications(AuthenticatedResource):
super(CertificateNotifications, self).__init__()
@validate_schema(None, notifications_output_schema)
def get(self, certificate_id, data=None):
def get(self, certificate_id):
"""
.. http:get:: /certificates/1/notifications
@ -426,8 +426,7 @@ class CertificateNotifications(AuthenticatedResource):
:reqheader Authorization: OAuth token to authenticate
:statuscode 200: no error
"""
data['certificate_id'] = certificate_id
return service.render(data)
return service.render({'certificate_id': certificate_id})
api.add_resource(NotificationsList, '/notifications', endpoint='notifications')