Changeset - 9640c1c6399b
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-09-01 21:56:56
marcin@python-works.com
really check if last status is from pull request
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/model/changeset_status.py
Show inline comments
 
@@ -146,8 +146,9 @@ class ChangesetStatusModel(BaseModel):
 

	
 
        #if statuses exists and last is associated with a closed pull request
 
        # we need to check if we can allow this status change
 
        if (dont_allow_on_closed_pull_request and cur_statuses 
 
            and cur_statuses[0].pull_request.status == PullRequest.STATUS_CLOSED):
 
        if (dont_allow_on_closed_pull_request and cur_statuses
 
            and getattr(cur_statuses[0].pull_request, 'status', '')
 
                == PullRequest.STATUS_CLOSED):
 
            raise StatusChangeOnClosedPullRequestError(
 
                'Changing status on closed pull request is not allowed'
 
            )
0 comments (0 inline, 0 general)