Commit 7536c73c authored by Michal Čihař's avatar Michal Čihař

Simplify code

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent d20e6260
......@@ -1433,24 +1433,18 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
'''
Checks whether there are some not committed changes.
'''
if self.is_repo_link:
return self.linked_subproject.repo_needs_commit()
return self.repository.needs_commit()
def repo_needs_merge(self):
'''
Checks whether there is something to merge from remote repository.
'''
if self.is_repo_link:
return self.linked_subproject.repo_needs_merge()
return self.repository.needs_merge()
def repo_needs_push(self):
'''
Checks whether there is something to push to remote repository.
'''
if self.is_repo_link:
return self.linked_subproject.repo_needs_push()
return self.repository.needs_push()
@property
......
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