mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 02:23:49 +01:00
fix error checking for new SQL
This commit is contained in:
parent
1ccabe2965
commit
2460d904bd
1 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ class MediaRepositoryStore(SQLBaseStore):
|
||||||
txn.execute(sql, (url, ts))
|
txn.execute(sql, (url, ts))
|
||||||
row = txn.fetchone()
|
row = txn.fetchone()
|
||||||
|
|
||||||
if not row[3]:
|
if not row:
|
||||||
# ...or if we've requested a timestamp older than the oldest
|
# ...or if we've requested a timestamp older than the oldest
|
||||||
# copy in the cache, return the oldest copy (if any)
|
# copy in the cache, return the oldest copy (if any)
|
||||||
sql = (
|
sql = (
|
||||||
|
@ -78,7 +78,7 @@ class MediaRepositoryStore(SQLBaseStore):
|
||||||
txn.execute(sql, (url, ts))
|
txn.execute(sql, (url, ts))
|
||||||
row = txn.fetchone()
|
row = txn.fetchone()
|
||||||
|
|
||||||
if not row[3]:
|
if not row:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return dict(zip((
|
return dict(zip((
|
||||||
|
|
Loading…
Reference in a new issue