diff --git a/app/apps/decisions/apps.py b/app/apps/decisions/apps.py index d9e7b0927..f8f60c160 100644 --- a/app/apps/decisions/apps.py +++ b/app/apps/decisions/apps.py @@ -3,6 +3,3 @@ class DecisionsConfig(AppConfig): name = "apps.decisions" - - def ready(self): - import apps.decisions.signals # noqa diff --git a/app/apps/decisions/signals.py b/app/apps/decisions/signals.py deleted file mode 100644 index e4f4faaae..000000000 --- a/app/apps/decisions/signals.py +++ /dev/null @@ -1,36 +0,0 @@ -# from apps.decisions.models import Decision -# from apps.summons.models import Summon -# from apps.workflow.models import CaseWorkflow -# from django.db.models.signals import post_save -# from django.dispatch import receiver - - -# @receiver(post_save, sender=Decision, dispatch_uid="decision_complete_task") -# def update_decision_with_summon(sender, instance, created, **kwargs): -# """ -# TODO: Temporary hook to update decision with a summon instance. -# This will be resolved when we support multiple summons. -# """ -# if kwargs.get("raw"): -# return -# if created: -# task = CaseWorkflow.get_task_by_task_id(instance.case_user_task_id) -# summon = Summon.objects.filter( -# id=task.workflow.get_data().get("summon_id", {}).get("value", 0) -# ).first() - -# data = { -# "type_besluit": {"value": instance.decision_type.workflow_option}, -# } -# if summon: -# instance.summon = summon -# instance.save() -# names = names = ", ".join( -# [person.__str__() for person in summon.persons.all()] -# ) -# data.update( -# { -# "names": {"value": f"{names}: {instance.decision_type.name}"}, -# } -# ) -# CaseWorkflow.complete_user_task(task.id, data, wait=True) diff --git a/app/apps/workflow/views.py b/app/apps/workflow/views.py index a3dddacb0..60d48551d 100644 --- a/app/apps/workflow/views.py +++ b/app/apps/workflow/views.py @@ -514,7 +514,6 @@ def complete_task(self, request): ) from .task_completion import complete_user_task - # completed_task = GenericCompletedTask.objects.create(data) response = complete_user_task(data) return Response(response) return Response(status=status.HTTP_400_BAD_REQUEST)