fix: filter removed tasks on restreamconfig update/delete by config-type!
This commit is contained in:
parent
bb18610dd9
commit
e1943b05f4
|
@ -23,7 +23,7 @@ def update_tasks(sender, **kwargs):
|
||||||
|
|
||||||
# Get the current task instance if it exists, and remove it
|
# Get the current task instance if it exists, and remove it
|
||||||
try:
|
try:
|
||||||
task = Task.objects.filter(config_id=instance.id).get()
|
task = Task.objects.filter(type='restream', config_id=instance.id).get()
|
||||||
task.delete()
|
task.delete()
|
||||||
except Task.DoesNotExist:
|
except Task.DoesNotExist:
|
||||||
pass
|
pass
|
||||||
|
@ -40,7 +40,7 @@ def delete_tasks(sender, **kwargs):
|
||||||
instance = kwargs['instance']
|
instance = kwargs['instance']
|
||||||
# Get the current task instance if it exists, and remove it
|
# Get the current task instance if it exists, and remove it
|
||||||
try:
|
try:
|
||||||
task = Task.objects.filter(config_id=instance.id).get()
|
task = Task.objects.filter(type='restream', config_id=instance.id).get()
|
||||||
task.delete()
|
task.delete()
|
||||||
except Task.DoesNotExist:
|
except Task.DoesNotExist:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue