From 8ab4d084e42d0563564e99e57127d7deb2ae12a1 Mon Sep 17 00:00:00 2001 From: Bart Jeukendrup Date: Sun, 8 Sep 2024 21:11:08 +0200 Subject: [PATCH] feat: add ability to configure sigmax return state --- .../stuf_protocol/incoming/actualiseerZaakstatus_Lk01.py | 3 ++- app/signals/settings.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/signals/apps/sigmax/stuf_protocol/incoming/actualiseerZaakstatus_Lk01.py b/app/signals/apps/sigmax/stuf_protocol/incoming/actualiseerZaakstatus_Lk01.py index a668ded38..c575f03e3 100644 --- a/app/signals/apps/sigmax/stuf_protocol/incoming/actualiseerZaakstatus_Lk01.py +++ b/app/signals/apps/sigmax/stuf_protocol/incoming/actualiseerZaakstatus_Lk01.py @@ -7,6 +7,7 @@ import logging import re +from django.conf import settings from django.core.exceptions import ValidationError from django.shortcuts import render from lxml import etree @@ -107,7 +108,7 @@ def _update_status_actualiseerZaakstatus_Lk01(signal, request_data): """ status_text = _get_status_text_actualiseerZaakstatus_Lk01(request_data) status_data = { - 'state': workflow.AFGEHANDELD_EXTERN, + 'state': workflow.AFGEHANDELD_EXTERN if not settings.SIGMAX_END_STATE_IS_AFGEHANDELD else workflow.AFGEHANDELD, 'text': status_text, 'extra_properties': { 'sigmax_datum_afgehandeld': request_data['datum_afgehandeld'], diff --git a/app/signals/settings.py b/app/signals/settings.py index 0ed8102aa..d05cc6d76 100644 --- a/app/signals/settings.py +++ b/app/signals/settings.py @@ -378,6 +378,7 @@ def is_super_user(user) -> bool: SIGMAX_CLIENT_CERT: str | None = os.getenv('SIGMAX_CLIENT_CERT', None) SIGMAX_CLIENT_KEY: str | None = os.getenv('SIGMAX_CLIENT_KEY', None) SIGMAX_SEND_FAIL_TIMEOUT_MINUTES: str | int = os.getenv('SIGMAX_SEND_FAIL_TIMEOUT_MINUTES', 60*24) # noqa Default is 24hrs. +SIGMAX_END_STATE_IS_AFGEHANDELD: bool = os.getenv('SIGMAX_END_STATE_IS_AFGEHANDELD', False) in TRUE_VALUES # Child settings SIGNAL_MAX_NUMBER_OF_CHILDREN: int = 10