You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-11-29 22:37:58 +02:00
Unify and coerce booleans from env used in admin
At some places, the string that DOMAIN_REGISTRATION is got used like a boolean (an easy misassumption to make while in python and dealing with the config dict), making `DOMAIN_REGISTRATION=False` act as a truthy value. To stop such future problems from happening, coerce environment config strings to real bools. closes #830
This commit is contained in:
@@ -410,7 +410,7 @@ class User(Base, Email):
|
||||
return emails
|
||||
|
||||
def send_welcome(self):
|
||||
if app.config["WELCOME"].lower() == "true":
|
||||
if app.config["WELCOME"]:
|
||||
self.sendmail(app.config["WELCOME_SUBJECT"],
|
||||
app.config["WELCOME_BODY"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user