summary refs log tree commit diff
path: root/synapse/storage/_base.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-06-10 16:05:10 +0100
committerErik Johnston <erik@matrix.org>2019-06-10 16:05:10 +0100
commitaad993f24d3a33bd2b3172f6d47c2d28d3e7a921 (patch)
tree7f74b4f6795b91d81ceed8ea0f5a3b1e0f2a5876 /synapse/storage/_base.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes (diff)
parentMerge branch 'erikj/fix_null_valid_until_ms' of github.com:matrix-org/synapse... (diff)
downloadsynapse-aad993f24d3a33bd2b3172f6d47c2d28d3e7a921.tar.xz
Merge branch 'release-v1.0.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r--synapse/storage/_base.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py

index 52891bb9eb..ae891aa332 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py
@@ -588,6 +588,10 @@ class SQLBaseStore(object): Args: table : string giving the table name values : dict of new column names and values for them + or_ignore : bool stating whether an exception should be raised + when a conflicting row already exists. If True, False will be + returned by the function instead + desc : string giving a description of the transaction Returns: bool: Whether the row was inserted or not. Only useful when @@ -1228,8 +1232,8 @@ class SQLBaseStore(object): ) txn.execute(select_sql, list(keyvalues.values())) - row = txn.fetchone() + if not row: if allow_none: return None