Always add [STAGE] email prefix unless running in production mode
This commit is contained in:
parent
facfba8fa9
commit
40518b5f1d
|
@ -217,7 +217,10 @@ class Email(object):
|
||||||
prefix = self.config.get('rattail.mail', '{0}.prefix'.format(self.key))
|
prefix = self.config.get('rattail.mail', '{0}.prefix'.format(self.key))
|
||||||
if not prefix:
|
if not prefix:
|
||||||
prefix = self.config.get('rattail.mail', 'default.prefix')
|
prefix = self.config.get('rattail.mail', 'default.prefix')
|
||||||
return prefix or self.default_prefix
|
prefix = prefix or self.default_prefix
|
||||||
|
if not self.config.production():
|
||||||
|
prefix = "[STAGE] {}".format(prefix)
|
||||||
|
return prefix
|
||||||
|
|
||||||
def get_subject(self, data={}, render=True):
|
def get_subject(self, data={}, render=True):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue