Skip to content

Commit

Permalink
Notify if request state change fails on deleting a project
Browse files Browse the repository at this point in the history
  • Loading branch information
rubhanazeem committed Mar 17, 2022
1 parent 4777b58 commit 1ab731d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/app/models/project.rb
Expand Up @@ -494,7 +494,7 @@ def revoke_requests
begin
request.change_state(newstate: 'revoked', comment: "The source project '#{name}' has been removed")
rescue PostRequestNoPermission
logger.debug "#{User.session!.login} tried to revoke request #{request.number} but had no permissions"
Airbrake.notify("#{User.session!.login} tried to revoke request #{request.number} but had no permissions")
end
break
end
Expand All @@ -503,7 +503,7 @@ def revoke_requests
begin
request.change_state(newstate: 'declined', comment: "The target project '#{name}' has been removed")
rescue PostRequestNoPermission
logger.debug "#{User.session!.login} tried to decline request #{request.number} but had no permissions"
Airbrake.notify("#{User.session!.login} tried to decline request #{request.number} but had no permissions")
end
break
end
Expand Down

0 comments on commit 1ab731d

Please sign in to comment.