new task bug fixed
This commit is contained in:
parent
f0e02c3c5f
commit
37cdb1675d
|
|
@ -107,7 +107,9 @@ class AsyncronWorker:
|
|||
from .models import Task
|
||||
for func in Task.registered_tasks.values():
|
||||
task = func.task
|
||||
if not task.pk: task.pk = Task.objects.get( name = task.name ).pk
|
||||
if not task.pk:
|
||||
try: task.pk = Task.objects.get( name = task.name ).pk
|
||||
except Task.DoesNotExist: pass #It's a new one, it's fine.
|
||||
|
||||
self.attach_django_signals()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user