From fab0ecdd969bb5b68037a306909d966500be6801 Mon Sep 17 00:00:00 2001 From: Sidney Richards Date: Tue, 8 Oct 2024 12:00:44 +0200 Subject: [PATCH] [#2800] Respect configured kanaal when registering contactmoment on zaak --- src/open_inwoner/cms/cases/tests/test_contactform.py | 7 ++++--- src/open_inwoner/cms/cases/views/status.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/open_inwoner/cms/cases/tests/test_contactform.py b/src/open_inwoner/cms/cases/tests/test_contactform.py index 48749e8965..e3f2f03a69 100644 --- a/src/open_inwoner/cms/cases/tests/test_contactform.py +++ b/src/open_inwoner/cms/cases/tests/test_contactform.py @@ -89,6 +89,7 @@ def setUp(self): self.ok_config.register_bronorganisatie_rsin = "123456788" self.ok_config.register_type = "Melding" self.ok_config.register_employee_id = "FooVonBar" + self.ok_config.register_channel = "the-designated-channel" self.ok_config.klanten_service = ServiceFactory( api_root=KLANTEN_ROOT, api_type=APITypes.kc ) @@ -498,7 +499,7 @@ def test_form_success_with_api(self, m, mock_contactmoment, mock_send_confirm): payload, { "bronorganisatie": "123456788", - "kanaal": "contactformulier", + "kanaal": "the-designated-channel", "medewerkerIdentificatie": {"identificatie": "FooVonBar"}, "onderwerp": "afdeling-x", "tekst": "Sample text", @@ -560,7 +561,7 @@ def test_form_success_missing_medewerker( payload, { "bronorganisatie": "123456788", - "kanaal": "contactformulier", + "kanaal": "the-designated-channel", "onderwerp": "afdeling-x", "tekst": "Sample text", "type": "Melding", @@ -644,7 +645,7 @@ def test_form_success_with_api_eherkenning_user( payload, { "bronorganisatie": "123456788", - "kanaal": "contactformulier", + "kanaal": "the-designated-channel", "medewerkerIdentificatie": {"identificatie": "FooVonBar"}, "onderwerp": "afdeling-x", "tekst": "Sample text", diff --git a/src/open_inwoner/cms/cases/views/status.py b/src/open_inwoner/cms/cases/views/status.py index b8aae5dc78..90cd53ed76 100644 --- a/src/open_inwoner/cms/cases/views/status.py +++ b/src/open_inwoner/cms/cases/views/status.py @@ -1008,7 +1008,7 @@ def register_by_api(self, form, config: OpenKlantConfig): "bronorganisatie": config.register_bronorganisatie_rsin, "tekst": question, "type": config.register_type, - "kanaal": "contactformulier", + "kanaal": config.register_channel, } if employee_id := config.register_employee_id: data["medewerkerIdentificatie"] = {"identificatie": employee_id}