Skip to content

Show error message instead of 500 when downloading certificate without a layout exists - #7

Open
et15 wants to merge 1 commit into
pythonitalia:mainfrom
et15:main
Open

Show error message instead of 500 when downloading certificate without a layout exists#7
et15 wants to merge 1 commit into
pythonitalia:mainfrom
et15:main

Conversation

@et15

@et15 et15 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

DownloadCertificateView.get() called render_certificate() without catching AttendanceCertificateLayout.DoesNotExist, causing an unhandled 500 when an event has no certificate layout configured yet. Now shows a control-panel error message and redirects back to the order, matching the pattern already used in SendCertificateView.

Why

To avoid server errors when trying to download certificates with non-existent layouts and tell the user what to do instead.

…t a layout

DownloadCertificateView.get() called render_certificate() without catching
AttendanceCertificateLayout.DoesNotExist, causing an unhandled 500 when an
event has no certificate layout configured yet. Now shows a control-panel
error message and redirects back to the order, matching the pattern already
used in SendCertificateView.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant