summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-12-06 10:14:59 +0000
committerErik Johnston <erik@matrix.org>2019-12-06 10:40:05 +0000
commitb3a4e35ca84a29fe4ccdfb1125ed098c68405d6c (patch)
treec13726e0a0d0d3e54af885af13526a97a41490d8 /synapse/storage
parentNewsfile (diff)
downloadsynapse-b3a4e35ca84a29fe4ccdfb1125ed098c68405d6c.tar.xz
Fixup functions to consistently return deferreds
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/data_stores/main/account_data.py2
-rw-r--r--synapse/storage/data_stores/main/group_server.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/data_stores/main/account_data.py b/synapse/storage/data_stores/main/account_data.py
index b0d22faf3f..ed97b3ffe5 100644
--- a/synapse/storage/data_stores/main/account_data.py
+++ b/synapse/storage/data_stores/main/account_data.py
@@ -250,7 +250,7 @@ class AccountDataWorkerStore(SQLBaseStore):
             user_id, int(stream_id)
         )
         if not changed:
-            return {}, {}
+            return defer.succeed(({}, {}))
 
         return self.runInteraction(
             "get_updated_account_data_for_user", get_updated_account_data_for_user_txn
diff --git a/synapse/storage/data_stores/main/group_server.py b/synapse/storage/data_stores/main/group_server.py
index 9e1d12bcb7..d29155a3b5 100644
--- a/synapse/storage/data_stores/main/group_server.py
+++ b/synapse/storage/data_stores/main/group_server.py
@@ -1109,7 +1109,7 @@ class GroupServerStore(SQLBaseStore):
             user_id, from_token
         )
         if not has_changed:
-            return []
+            return defer.succeed([])
 
         def _get_groups_changes_for_user_txn(txn):
             sql = """
@@ -1139,7 +1139,7 @@ class GroupServerStore(SQLBaseStore):
             from_token
         )
         if not has_changed:
-            return []
+            return defer.succeed([])
 
         def _get_all_groups_changes_txn(txn):
             sql = """