This commit is contained in:
j 2018-08-11 22:10:02 +02:00
parent 86c56fb139
commit c42fc8fd5e
1 changed files with 1 additions and 2 deletions

View File

@ -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: