mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-03 08:28:12 +08:00
Improved cluster test
This commit is contained in:
@@ -23,4 +23,5 @@ def get_task(name):
|
||||
:return: the full task object
|
||||
:rtype: Task
|
||||
"""
|
||||
return Task.objects.get(name=name)
|
||||
if Task.objects.filter(name=name).exists():
|
||||
return Task.objects.get(name=name)
|
||||
|
||||
Reference in New Issue
Block a user