diff options
author | Yasser Hussain <yasserhussain1110@gmail.com> | 2016-04-06 12:37:31 +0300 |
---|---|---|
committer | Yasser Hussain <yasserhussain1110@gmail.com> | 2016-04-06 12:37:31 +0300 |
commit | d023a8528713ab9ffd8a9fc034f752ab91442b24 (patch) | |
tree | a9b89d7aea30b5703c59dd485a9e1a3f50ba9247 /lib | |
parent | 74313988aca5de1e65940d311f0f87e9da1b93c2 (diff) |
Changed the argument of not_found for 'unprotect'
not_found appends string "Not Found" to the argument causing the resulting message to be "Branch does not exist Not Found" which is an incorrect error message.
Changed the argument of not_found! for 'unprotect' command to "Branch" from "Branch does not exist". This makes the final error message to appear as "Branch Not Found" which is correct and same as error messages for other commands like 'protect'.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/branches.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/branches.rb b/lib/api/branches.rb index 592100a7045..231840148d9 100644 --- a/lib/api/branches.rb +++ b/lib/api/branches.rb @@ -64,7 +64,7 @@ module API authorize_admin_project @branch = user_project.repository.find_branch(params[:branch]) - not_found!("Branch does not exist") unless @branch + not_found!("Branch") unless @branch protected_branch = user_project.protected_branches.find_by(name: @branch.name) protected_branch.destroy if protected_branch |