API - disable emails sending when EMAIL_URL is not initialized
This commit is contained in:
@ -42,6 +42,7 @@ def get_application_config() -> Union[Dict, HttpResponse]:
|
||||
"data": {
|
||||
"admin_contact": "admin@example.com",
|
||||
"gpx_limit_import": 10,
|
||||
"is_email_sending_enabled": true,
|
||||
"is_registration_enabled": false,
|
||||
"max_single_file_size": 1048576,
|
||||
"max_users": 0,
|
||||
@ -91,6 +92,7 @@ def update_application_config(auth_user: User) -> Union[Dict, HttpResponse]:
|
||||
"data": {
|
||||
"admin_contact": "admin@example.com",
|
||||
"gpx_limit_import": 10,
|
||||
"is_email_sending_enabled": true,
|
||||
"is_registration_enabled": false,
|
||||
"max_single_file_size": 1048576,
|
||||
"max_users": 10,
|
||||
|
@ -46,6 +46,7 @@ class AppConfig(BaseModel):
|
||||
return {
|
||||
'admin_contact': self.admin_contact,
|
||||
'gpx_limit_import': self.gpx_limit_import,
|
||||
'is_email_sending_enabled': current_app.config['CAN_SEND_EMAILS'],
|
||||
'is_registration_enabled': self.is_registration_enabled,
|
||||
'max_single_file_size': self.max_single_file_size,
|
||||
'max_zip_file_size': self.max_zip_file_size,
|
||||
|
Reference in New Issue
Block a user