You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: