##// END OF EJS Templates
really check if last status is from pull request
marcink -
r2771:9640c1c6 beta
parent child Browse files
Show More
@@ -146,8 +146,9 b' class ChangesetStatusModel(BaseModel):'
146
146
147 #if statuses exists and last is associated with a closed pull request
147 #if statuses exists and last is associated with a closed pull request
148 # we need to check if we can allow this status change
148 # we need to check if we can allow this status change
149 if (dont_allow_on_closed_pull_request and cur_statuses
149 if (dont_allow_on_closed_pull_request and cur_statuses
150 and cur_statuses[0].pull_request.status == PullRequest.STATUS_CLOSED):
150 and getattr(cur_statuses[0].pull_request, 'status', '')
151 == PullRequest.STATUS_CLOSED):
151 raise StatusChangeOnClosedPullRequestError(
152 raise StatusChangeOnClosedPullRequestError(
152 'Changing status on closed pull request is not allowed'
153 'Changing status on closed pull request is not allowed'
153 )
154 )
General Comments 0
You need to be logged in to leave comments. Login now