Commit 2aaa3aca authored by Michal Čihař's avatar Michal Čihař

Avoid adding linked repos several times

We just need to process every repository once.
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 270d348f
...@@ -458,13 +458,12 @@ class Project(models.Model, PercentMixin, URLMixin, PathMixin): ...@@ -458,13 +458,12 @@ class Project(models.Model, PercentMixin, URLMixin, PathMixin):
[component.get_repo_link_url() for component in result] [component.get_repo_link_url() for component in result]
) )
result.extend( linked = self.subproject_set.filter(repo__startswith='weblate://')
self.subproject_set.filter( for other in linked:
repo__startswith='weblate://' if other.repo in included:
).exclude( continue
repo__in=included included.add(other.repo)
) result.append(other)
)
return result return result
......
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