Cast bacjup version to int when querying

This commit is contained in:
David Baker 2018-10-30 11:01:07 +00:00 committed by Andrew Morgan
parent b0ac23319a
commit efb77b87d1

View file

@ -219,7 +219,12 @@ class EndToEndRoomKeyStore(SQLBaseStore):
if version is None: if version is None:
this_version = self._get_current_version(txn, user_id) this_version = self._get_current_version(txn, user_id)
else: else:
this_version = version try:
this_version = int(version)
except ValueError:
# Our versions are all ints so if we can't convert it to an integer,
# it isn't there.
raise StoreError(404, "No row found")
result = self._simple_select_one_txn( result = self._simple_select_one_txn(
txn, txn,