Commit 9899f02c authored by Michal Čihař's avatar Michal Čihař

Simplify code

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent c675c6ae
...@@ -1228,12 +1228,11 @@ class Translation(models.Model, URLMixin, PercentMixin): ...@@ -1228,12 +1228,11 @@ class Translation(models.Model, URLMixin, PercentMixin):
author = self.get_author_name(request.user) author = self.get_author_name(request.user)
# List translations we should process # List translations we should process
# Filter out those who don't want automatic update, but keep ourselves
translations = Translation.objects.filter( translations = Translation.objects.filter(
language=self.language, language=self.language,
subproject__project=self.subproject.project subproject__project=self.subproject.project
) ).filter(
# Filter out those who don't want automatic update, but keep ourselves
translations = translations.filter(
Q(pk=self.pk) | Q(subproject__allow_translation_propagation=True) Q(pk=self.pk) | Q(subproject__allow_translation_propagation=True)
) )
......
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