Commit 6d5cd6ff authored by Michal Čihař's avatar Michal Čihař

Factor out syncing of git repo

parent 1ff02427
......@@ -380,12 +380,21 @@ class SubProject(models.Model):
# Remove possible encoding part
return code.split('.')[0]
def save(self, *args, **kwargs):
def sync_git_repo(self):
'''
Brings git repo in sync with current model.
'''
self.configure_repo()
self.configure_branch()
self.commit_pending()
self.update_branch()
def clean(self):
self.sync_git_repo()
def save(self, *args, **kwargs):
self.sync_git_repo()
super(SubProject, self).save(*args, **kwargs)
self.create_translations()
......
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