From 5cdb53eeb17da7f8a2112a9ab26282c4a299039e Mon Sep 17 00:00:00 2001 From: Paul Schilling Date: Thu, 21 Mar 2024 10:59:02 +0100 Subject: [PATCH] [#2243] Remove subject from question card text --- src/open_inwoner/openklant/tests/test_contactform.py | 12 +++++------- src/open_inwoner/openklant/views/contactform.py | 4 +--- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/open_inwoner/openklant/tests/test_contactform.py b/src/open_inwoner/openklant/tests/test_contactform.py index 6cbb1798de..512f0416f5 100644 --- a/src/open_inwoner/openklant/tests/test_contactform.py +++ b/src/open_inwoner/openklant/tests/test_contactform.py @@ -269,7 +269,7 @@ def test_submit_and_register_anon_via_api_with_klant(self, m): { "medewerkerIdentificatie": {"identificatie": "FooVonBar"}, "bronorganisatie": "123456789", - "tekst": "Onderwerp: Aanvraag document\n\nhey!\n\nwaddup?", + "tekst": "hey!\n\nwaddup?", "type": "Melding", "kanaal": "contactformulier", "onderwerp": "afdeling-xyz", @@ -333,8 +333,6 @@ def test_submit_and_register_anon_via_api_without_klant(self, m): text = inspect.cleandoc( """ - Onderwerp: Aanvraag document - hey! waddup? @@ -415,7 +413,7 @@ def test_submit_and_register_bsn_user_via_api(self, m): { "medewerkerIdentificatie": {"identificatie": "FooVonBar"}, "bronorganisatie": "123456789", - "tekst": "Onderwerp: Aanvraag document\n\nhey!\n\nwaddup?", + "tekst": "hey!\n\nwaddup?", "type": "Melding", "kanaal": "contactformulier", "onderwerp": "afdeling-xyz", @@ -505,7 +503,7 @@ def test_submit_and_register_kvk_or_rsin_user_via_api(self, _m): { "medewerkerIdentificatie": {"identificatie": "FooVonBar"}, "bronorganisatie": "123456789", - "tekst": "Onderwerp: Aanvraag document\n\nhey!\n\nwaddup?", + "tekst": "hey!\n\nwaddup?", "type": "Melding", "kanaal": "contactformulier", "onderwerp": "afdeling-xyz", @@ -581,7 +579,7 @@ def test_submit_and_register_bsn_user_via_api_and_update_klant(self, m): { "medewerkerIdentificatie": {"identificatie": "FooVonBar"}, "bronorganisatie": "123456789", - "tekst": "Onderwerp: Aanvraag document\n\nhey!\n\nwaddup?", + "tekst": "hey!\n\nwaddup?", "type": "Melding", "kanaal": "contactformulier", "onderwerp": "afdeling-xyz", @@ -677,7 +675,7 @@ def test_submit_and_register_kvk_or_rsin_user_via_api_and_update_klant(self, _m) { "medewerkerIdentificatie": {"identificatie": "FooVonBar"}, "bronorganisatie": "123456789", - "tekst": "Onderwerp: Aanvraag document\n\nhey!\n\nwaddup?", + "tekst": "hey!\n\nwaddup?", "type": "Melding", "kanaal": "contactformulier", "onderwerp": "afdeling-xyz", diff --git a/src/open_inwoner/openklant/views/contactform.py b/src/open_inwoner/openklant/views/contactform.py index 13a342d938..7301d37bc5 100644 --- a/src/open_inwoner/openklant/views/contactform.py +++ b/src/open_inwoner/openklant/views/contactform.py @@ -171,9 +171,7 @@ def register_by_api(self, form, config: OpenKlantConfig): subject = form.cleaned_data["subject"].subject subject_code = form.cleaned_data["subject"].subject_code question = form.cleaned_data["question"] - text = _("Onderwerp: {subject}\n\n{question}").format( - subject=subject, question=question - ) + text = question if not klant: # if we don't have a BSN and can't create a Klant we'll add contact info to the tekst