diff --git a/tasks.py b/tasks.py index 5c757ae..f1e72c4 100644 --- a/tasks.py +++ b/tasks.py @@ -8,10 +8,9 @@ from celery.task import periodic_task def subtitles_user(**kwargs): import annotation.models from user.models import User - u = User.object.get(username='subtitles') + u = User.objects.get(username='subtitles') annotation.models.Annotation.objects.filter(layer='subtitles').exclude(user=u).update(user=u) - t = datetime.now() - annotation.models.Annotation.objects.all().order_by('-created')[0].created if t < timedelta(hours=1): try: