Commit 76008381 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

update repo: fix branch name

parent 8ea56c44
Pipeline #2929 passed with stages
in 1 minute and 9 seconds
......@@ -310,7 +310,8 @@ class Project(Links, NamedModel, TimeStampedModel):
Tag.objects.get_or_create(name=str(tag), project=self)
def update_repo(self):
self.git().head.commit = self.git().remotes[self.main_repo().git_remote()].refs[self.main_branch()].commit
branch = str(self.main_branch()).split('/', maxsplit=2)[2]
self.git().head.commit = self.git().remotes[self.main_repo().git_remote()].refs[branch].commit
def update(self, only_main_branches=True):
if self.main_namespace is None:
Supports Markdown
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