Skip to content

Commit

Permalink
✏️ [#4895] Rename event 'cosign confirmation' to 'cosign request'
Browse files Browse the repository at this point in the history
It is rather a cosign request email, since the cosign confirmation itself is not much different from the "normal" confirmation email.
  • Loading branch information
viktorvanwijk committed Dec 12, 2024
1 parent 658c18b commit 9441219
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/openforms/emails/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class EmailEventChoices(models.TextChoices):
registration = "registration", _("Registration")
confirmation = "confirmation", _("Confirmation")
cosign_confirmation = "cosign_confirmation", _("Co-sign confirmation")
cosign_request = "cosign_request", _("Co-sign request")


class EmailContentTypeChoices(models.TextChoices):
Expand Down
2 changes: 1 addition & 1 deletion src/openforms/submissions/tasks/emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def send_email_cosigner(submission_id: int) -> None:
"Content-Language": submission.language_code,
X_OF_CONTENT_TYPE_HEADER: EmailContentTypeChoices.submission,
X_OF_CONTENT_UUID_HEADER: str(submission.uuid),
X_OF_EVENT_HEADER: EmailEventChoices.cosign_confirmation,
X_OF_EVENT_HEADER: EmailEventChoices.cosign_request,
},
)
except Exception:
Expand Down
4 changes: 2 additions & 2 deletions src/openforms/submissions/tests/test_task_co_sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def test_form_link_not_allowed_in_email(self):
self.assertNotIn(form_link, email.body)
self.assertIn(submission.public_registration_reference, email.body)

def test_headers_in_cosign_email(self):
def test_headers_in_cosign_request_email(self):
submission = SubmissionFactory.from_components(
components_list=[
{
Expand All @@ -204,6 +204,6 @@ def test_headers_in_cosign_email(self):
{
"Content-Language": "nl",
"X-OF-Content-Type": EmailContentTypeChoices.submission,
"X-OF-Event": EmailEventChoices.cosign_confirmation,
"X-OF-Event": EmailEventChoices.cosign_request,
},
)

0 comments on commit 9441219

Please sign in to comment.