Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up EmailTemplateException #185

Open
dleehr opened this issue Oct 1, 2018 · 0 comments
Open

Clean up EmailTemplateException #185

dleehr opened this issue Oct 1, 2018 · 0 comments

Comments

@dleehr
Copy link
Member

dleehr commented Oct 1, 2018

While reviewing #184 I notice that EmailTemplateException is defined in models.py and raised there. I introduced this pattern in c39b287 and it should be refactored.

EmailTemplateException is the only exception defined in models.py, and it's only raised when a DoesNotExist exception is encountered. Since that's already an appropriate model-layer exception, this logic should be moved out to the consumers. Put another way, the model should not be concerned with setup at this level.

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

No branches or pull requests

1 participant