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):
[component.get_repo_link_url() for component in result]
)
result.extend(
self.subproject_set.filter(
repo__startswith='weblate://'
).exclude(
repo__in=included
)
)
linked = self.subproject_set.filter(repo__startswith='weblate://')
for other in linked:
if other.repo in included:
continue
included.add(other.repo)
result.append(other)
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