summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2020-01-20 16:21:59 +0000
committerGitHub <noreply@github.com>2020-01-20 16:21:59 +0000
commite9e066055fca9800fec9d8d4beb490192f80f586 (patch)
treec4aa04ae187d9b598343439d1e1c3a97c40bf588 /synapse/config
parentRevert "Newsfile" (diff)
parentUpdate changelog.d/6747.bugfix (diff)
downloadsynapse-e9e066055fca9800fec9d8d4beb490192f80f586.tar.xz
Fix empty account_validity config block (#6747)
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/registration.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/config/registration.py b/synapse/config/registration.py
index b873995a49..9bb3beedbc 100644
--- a/synapse/config/registration.py
+++ b/synapse/config/registration.py
@@ -29,6 +29,7 @@ class AccountValidityConfig(Config):
     def __init__(self, config, synapse_config):
         if config is None:
             return
+        super(AccountValidityConfig, self).__init__()
         self.enabled = config.get("enabled", False)
         self.renew_by_email_enabled = "renew_at" in config
 
@@ -93,7 +94,7 @@ class RegistrationConfig(Config):
             )
 
         self.account_validity = AccountValidityConfig(
-            config.get("account_validity", {}), config
+            config.get("account_validity") or {}, config
         )
 
         self.registrations_require_3pid = config.get("registrations_require_3pid", [])