Commit 99bbeff1 authored by Michal Čihař's avatar Michal Čihař

Review should not fail on translation with no strings

parent 687f5b43
......@@ -183,7 +183,10 @@ class UnitManager(models.Manager):
if user.is_anonymous():
return self.none()
from weblate.trans.models.changes import Change
sample = self.all()[0]
try:
sample = self.all()[0]
except IndexError:
return self.none()
changes = Change.objects.content().filter(
translation=sample.translation,
timestamp__gte=date
......
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