From f460da6031d01b2b271ded097ed6be65fd1b24f9 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Thu, 16 Jul 2020 11:32:19 -0400 Subject: Consistently use `db_to_json` to convert from database values to JSON objects. (#7849) --- synapse/storage/background_updates.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'synapse/storage/background_updates.py') diff --git a/synapse/storage/background_updates.py b/synapse/storage/background_updates.py index 59f3394b0a..018826ef69 100644 --- a/synapse/storage/background_updates.py +++ b/synapse/storage/background_updates.py @@ -249,7 +249,10 @@ class BackgroundUpdater(object): retcol="progress_json", ) - progress = json.loads(progress_json) + # Avoid a circular import. + from synapse.storage._base import db_to_json + + progress = db_to_json(progress_json) time_start = self._clock.time_msec() items_updated = await update_handler(progress, batch_size) -- cgit 1.5.1