Commit 427e3f38 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

update branches for real…

parent c997a172
Pipeline #2749 passed with stages
in 1 minute and 4 seconds
......@@ -247,9 +247,8 @@ class Project(Links, NamedModel, TimeStampedModel):
})
if created:
repo.api_update()
instance, bcreated = Branch.objects.get_or_create(name=branch, project=self, repo=repo)
if bcreated:
instance.update(pull=pull)
instance, _ = Branch.objects.get_or_create(name=branch, project=self, repo=repo)
instance.update(pull=pull)
def checkout(self):
self.main_branch().git().checkout()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment