summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2016-04-08 19:04:29 +0100
committerMatthew Hodgson <matthew@matrix.org>2016-04-08 19:04:29 +0100
commit2460d904bd1e910884c1854a8c5d57df8aa4b765 (patch)
tree97e49723ea3085c7ac4eb2c1cae6fac258134d63 /synapse
parentmore PR feedback (diff)
downloadsynapse-2460d904bd1e910884c1854a8c5d57df8aa4b765.tar.xz
fix error checking for new SQL
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/media_repository.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/media_repository.py b/synapse/storage/media_repository.py
index 6bc53bbb6d..a820fcf07f 100644
--- a/synapse/storage/media_repository.py
+++ b/synapse/storage/media_repository.py
@@ -66,7 +66,7 @@ class MediaRepositoryStore(SQLBaseStore):
             txn.execute(sql, (url, ts))
             row = txn.fetchone()
 
-            if not row[3]:
+            if not row:
                 # ...or if we've requested a timestamp older than the oldest
                 # copy in the cache, return the oldest copy (if any)
                 sql = (
@@ -78,7 +78,7 @@ class MediaRepositoryStore(SQLBaseStore):
                 txn.execute(sql, (url, ts))
                 row = txn.fetchone()
 
-            if not row[3]:
+            if not row:
                 return None
 
             return dict(zip((