fix: filter removed tasks on restreamconfig update/delete by config-type!

This commit is contained in:
Jan Koppe 2020-05-31 15:22:05 +02:00
parent bb18610dd9
commit e1943b05f4
Signed by: thunfisch
GPG Key ID: BE935B0735A2129B
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ def update_tasks(sender, **kwargs):
# Get the current task instance if it exists, and remove it
try:
task = Task.objects.filter(config_id=instance.id).get()
task = Task.objects.filter(type='restream', config_id=instance.id).get()
task.delete()
except Task.DoesNotExist:
pass
@ -40,7 +40,7 @@ def delete_tasks(sender, **kwargs):
instance = kwargs['instance']
# Get the current task instance if it exists, and remove it
try:
task = Task.objects.filter(config_id=instance.id).get()
task = Task.objects.filter(type='restream', config_id=instance.id).get()
task.delete()
except Task.DoesNotExist:
pass