Fix log for reenabling a notification
We forgot to log the event and method names
This commit is contained in:
parent
e45ffb39d1
commit
11659f73bf
2 changed files with 8 additions and 5 deletions
|
@ -161,10 +161,12 @@ class RepositoryNotification(RepositoryParamResource):
|
|||
@disallow_for_app_repositories
|
||||
def post(self, namespace, repository, uuid):
|
||||
""" Resets repository notification to 0 failures. """
|
||||
model.notification.reset_notification_number_of_failures(namespace, repository, uuid)
|
||||
log_action('reset_repo_notification', namespace,
|
||||
{'repo': repository, 'namespace': namespace, 'notification_id': uuid},
|
||||
repo=model.repository.get_repository(namespace, repository))
|
||||
reset = model.notification.reset_notification_number_of_failures(namespace, repository, uuid)
|
||||
if reset is not None:
|
||||
log_action('reset_repo_notification', namespace,
|
||||
{'repo': repository, 'namespace': namespace, 'notification_id': uuid,
|
||||
'event': reset.event.name, 'method': reset.method.name},
|
||||
repo=model.repository.get_repository(namespace, repository))
|
||||
|
||||
return 'No Content', 204
|
||||
|
||||
|
|
Reference in a new issue