From 5ca71f5f4121fc98344d70ee07d9b5309471f5b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Thu, 6 Oct 2016 00:10:20 +0200 Subject: [PATCH] gitlab do_submit_edit: check only for 201 on create branch --- src/c3nav/editor/hosters/gitlab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c3nav/editor/hosters/gitlab.py b/src/c3nav/editor/hosters/gitlab.py index bc4e7043..de808a36 100644 --- a/src/c3nav/editor/hosters/gitlab.py +++ b/src/c3nav/editor/hosters/gitlab.py @@ -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