gitlab do_submit_edit: check only for 201 on create branch

This commit is contained in:
Laura Klünder 2016-10-06 00:10:20 +02:00
parent 6ae94ab151
commit 5ca71f5f41

View file

@ -102,7 +102,7 @@ class GitlabHoster(Hoster):
branch_name = 'editor-%s' % uuid.uuid4()
response = requests.post(endpoint_url('/projects/%d/repository/branches' % project['id']),
data={'branch_name': branch_name, 'ref': data['commit_id']})
if response.status_code not in (200, 201):
if response.status_code != 201:
return self._submit_error('Could not create branch.')
# Make commit