Duke-GCB / Duke-GCB/D4S2

Clean up EmailTemplateException

Open
#185 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

While reviewing #184 I notice that `EmailTemplateException` is defined in models.py and raised there. I introduced this pattern in c39b287fccdf702e0126179360a1b297ae1c1a95 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.