Commit 943d6022 authored by Michal Čihař's avatar Michal Čihař

Show secondary units only from same component

Fixes #995
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 48f47018
......@@ -1056,12 +1056,11 @@ class Unit(models.Model, LoggerMixin):
secondary_langs = user.profile.secondary_languages.exclude(
id=self.translation.language.id
)
project = self.translation.subproject.project
return get_distinct_translations(
Unit.objects.filter(
checksum=self.checksum,
translated=True,
translation__subproject__project=project,
translation__subproject=self.translation.subproject,
translation__language__in=secondary_langs,
)
)
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