summary refs log tree commit diff
path: root/synapse/storage/_base.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-05-13 11:25:02 +0100
committerErik Johnston <erik@matrix.org>2016-05-13 11:25:02 +0100
commit13d37c3c568ac7bfea2e03eff373189c57c0f3fd (patch)
treedd1153b06e372b87e729832b0740b7065e6ecffb /synapse/storage/_base.py
parentMerge pull request #776 from matrix-org/markjh/lazy_signing_key (diff)
downloadsynapse-13d37c3c568ac7bfea2e03eff373189c57c0f3fd.tar.xz
Fixup add_pusher
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r--synapse/storage/_base.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index 1e27c2c0ce..258b251141 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -453,7 +453,9 @@ class SQLBaseStore(object):
             keyvalues (dict): The unique key tables and their new values
             values (dict): The nonunique columns and their new values
             insertion_values (dict): key/values to use when inserting
-        Returns: A deferred
+        Returns:
+            Deferred(bool): True if a new entry was created, False if an
+                exisitng one was updated.
         """
         return self.runInteraction(
             desc,
@@ -498,6 +500,10 @@ class SQLBaseStore(object):
             )
             txn.execute(sql, allvalues.values())
 
+            return True
+        else:
+            return False
+
     def _simple_select_one(self, table, keyvalues, retcols,
                            allow_none=False, desc="_simple_select_one"):
         """Executes a SELECT query on the named table, which is expected to