summary refs log tree commit diff
path: root/synapse/storage/data_stores/main
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-12-09 11:32:44 +0000
committerGitHub <noreply@github.com>2019-12-09 11:32:44 +0000
commita9b393340fb9e4bf227f5ef0ca3de708748a617c (patch)
treeb80d67d8eaf89bb1e993cf159643229b4672541a /synapse/storage/data_stores/main
parentMerge pull request #6469 from matrix-org/erikj/make_database_class (diff)
parentFixup functions to consistently return deferreds (diff)
downloadsynapse-a9b393340fb9e4bf227f5ef0ca3de708748a617c.tar.xz
Merge pull request #6484 from matrix-org/erikj/port_sync_handler
Port SyncHandler to async/await
Diffstat (limited to 'synapse/storage/data_stores/main')
-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 a96fe9485c..1a3dd7be8d 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.db.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 7f5e8dce66..6acd45e9f3 100644
--- a/synapse/storage/data_stores/main/group_server.py
+++ b/synapse/storage/data_stores/main/group_server.py
@@ -1111,7 +1111,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 = """
@@ -1141,7 +1141,7 @@ class GroupServerStore(SQLBaseStore):
             from_token
         )
         if not has_changed:
-            return []
+            return defer.succeed([])
 
         def _get_all_groups_changes_txn(txn):
             sql = """