summary refs log tree commit diff
path: root/synapse/storage/databases
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-11-23 10:21:19 -0500
committerGitHub <noreply@github.com>2021-11-23 15:21:19 +0000
commit55669bd3de7137553085e9f1c16a686ff657108c (patch)
tree28637b8af5497395537cf11b0f627e05d32670da /synapse/storage/databases
parentRemove code invalidated by deprecated config flag 'trust_identity_servers_for... (diff)
downloadsynapse-55669bd3de7137553085e9f1c16a686ff657108c.tar.xz
Add missing type hints to config base classes (#11377)
Diffstat (limited to 'synapse/storage/databases')
-rw-r--r--synapse/storage/databases/main/registration.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/databases/main/registration.py b/synapse/storage/databases/main/registration.py
index 8478463a2a..0e8c168667 100644
--- a/synapse/storage/databases/main/registration.py
+++ b/synapse/storage/databases/main/registration.py
@@ -1198,8 +1198,9 @@ class RegistrationWorkerStore(CacheInvalidationWorkerStore):
         expiration_ts = now_ms + self._account_validity_period
 
         if use_delta:
+            assert self._account_validity_startup_job_max_delta is not None
             expiration_ts = random.randrange(
-                expiration_ts - self._account_validity_startup_job_max_delta,
+                int(expiration_ts - self._account_validity_startup_job_max_delta),
                 expiration_ts,
             )