From e1943b05f4956dca008c22bc9fecaf06c496f5c3 Mon Sep 17 00:00:00 2001 From: Jan Koppe Date: Sun, 31 May 2020 15:22:05 +0200 Subject: [PATCH] fix: filter removed tasks on restreamconfig update/delete by config-type! --- restream/signals.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/restream/signals.py b/restream/signals.py index 63ee256..5427a38 100644 --- a/restream/signals.py +++ b/restream/signals.py @@ -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