Commit 95e8d43e authored by Michal Čihař's avatar Michal Čihař

Prevent failure on anonymous user

parent c5fcb933
......@@ -151,6 +151,8 @@ class UnitManager(models.Manager):
'''
Returns units touched by other users since given time.
'''
if user.is_anonymous():
return self.none()
from trans.models import Change
sample = self.all()[0]
changes = Change.objects.filter(unit__translation = sample.translation, timestamp__gte = date).exclude(user = user)
......
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