Skip to content

Commit

Permalink
Merge pull request #1105 from maykinmedia/fix/2243-question-card-layout
Browse files Browse the repository at this point in the history
[#2243] Remove subject from question card text
  • Loading branch information
alextreme authored Mar 22, 2024
2 parents dbac7f5 + 5cdb53e commit 72b6e2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
12 changes: 5 additions & 7 deletions src/open_inwoner/openklant/tests/test_contactform.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -333,8 +333,6 @@ def test_submit_and_register_anon_via_api_without_klant(self, m):

text = inspect.cleandoc(
"""
Onderwerp: Aanvraag document
hey!
waddup?
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 1 addition & 3 deletions src/open_inwoner/openklant/views/contactform.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 72b6e2d

Please sign in to comment.