diff --git a/pagure/api/__init__.py b/pagure/api/__init__.py index f88eea7..d482b4d 100644 --- a/pagure/api/__init__.py +++ b/pagure/api/__init__.py @@ -44,7 +44,7 @@ class APIERROR(enum.Enum): 'this project' EPRSCORE = 'This request does not have the minimum review score '\ 'necessary to be merged' - ENOASSIG = 'Only the assignee can merge this review' + ENOTASSIGNEE = 'Only the assignee can merge this review' ENOTASSIGNED = 'This request must be assigned to be merged' ENOUSER = 'No such user found' diff --git a/pagure/api/fork.py b/pagure/api/fork.py index 0162b05..287aea8 100644 --- a/pagure/api/fork.py +++ b/pagure/api/fork.py @@ -316,7 +316,8 @@ def api_pull_request_merge(repo, requestid, username=None): 403, error_code=APIERROR.ENOTASSIGNED) if request.assignee.username != flask.g.fas_user.username: - raise pagure.exceptions.APIError(403, error_code=APIERROR.ENOASSIG) + raise pagure.exceptions.APIError( + 403, error_code=APIERROR.ENOTASSIGNEE) threshold = repo.settings.get('Minimum_score_to_merge_pull-request', -1) if threshold > 0 and int(request.score) < int(threshold):