typo
This commit is contained in:
parent
86c56fb139
commit
c42fc8fd5e
1 changed files with 1 additions and 2 deletions
3
tasks.py
3
tasks.py
|
@ -8,10 +8,9 @@ from celery.task import periodic_task
|
||||||
def subtitles_user(**kwargs):
|
def subtitles_user(**kwargs):
|
||||||
import annotation.models
|
import annotation.models
|
||||||
from user.models import User
|
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)
|
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
|
t = datetime.now() - annotation.models.Annotation.objects.all().order_by('-created')[0].created
|
||||||
if t < timedelta(hours=1):
|
if t < timedelta(hours=1):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue