Commit b10ae996 authored by Michal Čihař's avatar Michal Čihař

Filter first by translation

Prefer most fine grained filter over generic ones.
parent c2100cd4
...@@ -533,12 +533,12 @@ class ChangeManager(models.Manager): ...@@ -533,12 +533,12 @@ class ChangeManager(models.Manager):
base = self.all() base = self.all()
# Filter by translation/project # Filter by translation/project
if project is not None: if translation is not None:
base = base.filter(translation__subproject__project=project) base = base.filter(translation=translation)
elif subproject is not None: elif subproject is not None:
base = base.filter(translation__subproject=subproject) base = base.filter(translation__subproject=subproject)
elif translation is not None: elif project is not None:
base = base.filter(translation=translation) base = base.filter(translation__subproject__project=project)
# Filter by language # Filter by language
if language is not None: if language is not None:
......
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