1 files changed, 3 insertions, 1 deletions
diff --git a/tests/handlers/test_stats.py b/tests/handlers/test_stats.py
index 76c56d5434..15e19b15fb 100644
--- a/tests/handlers/test_stats.py
+++ b/tests/handlers/test_stats.py
@@ -84,7 +84,7 @@ class StatsRoomTests(unittest.HomeserverTestCase):
cols = list(stats.ABSOLUTE_STATS_FIELDS[stats_type])
- return self.get_success(
+ row = self.get_success(
self.store.db_pool.simple_select_one(
table + "_current",
{id_col: stat_id},
@@ -93,6 +93,8 @@ class StatsRoomTests(unittest.HomeserverTestCase):
)
)
+ return None if row is None else dict(zip(cols, row))
+
def _perform_background_initial_update(self) -> None:
# Do the initial population of the stats via the background update
self._add_background_updates()
|