mirror of
https://mau.dev/maunium/synapse.git
synced 2024-09-04 08:32:29 +00:00
Fix empty account_validity config block (#6747)
This commit is contained in:
commit
e9e066055f
1
changelog.d/6747.bugfix
Normal file
1
changelog.d/6747.bugfix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fix bug when setting `account_validity` to an empty block in the config. Thanks to @Sorunome for reporting.
|
@ -29,6 +29,7 @@ class AccountValidityConfig(Config):
|
|||||||
def __init__(self, config, synapse_config):
|
def __init__(self, config, synapse_config):
|
||||||
if config is None:
|
if config is None:
|
||||||
return
|
return
|
||||||
|
super(AccountValidityConfig, self).__init__()
|
||||||
self.enabled = config.get("enabled", False)
|
self.enabled = config.get("enabled", False)
|
||||||
self.renew_by_email_enabled = "renew_at" in config
|
self.renew_by_email_enabled = "renew_at" in config
|
||||||
|
|
||||||
@ -93,7 +94,7 @@ class RegistrationConfig(Config):
|
|||||||
)
|
)
|
||||||
|
|
||||||
self.account_validity = AccountValidityConfig(
|
self.account_validity = AccountValidityConfig(
|
||||||
config.get("account_validity", {}), config
|
config.get("account_validity") or {}, config
|
||||||
)
|
)
|
||||||
|
|
||||||
self.registrations_require_3pid = config.get("registrations_require_3pid", [])
|
self.registrations_require_3pid = config.get("registrations_require_3pid", [])
|
||||||
|
Loading…
Reference in New Issue
Block a user