diff options
author | Jonathan de Jong <jonathan@automatia.nl> | 2021-02-05 21:39:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-05 15:39:19 -0500 |
commit | d882fbca388692f475673007df4f7ac394446b46 (patch) | |
tree | 7467f86c9df44cb95b1f32b5f169babd89c73c8f /synapse/storage/prepare_database.py | |
parent | Update installation instructions on Fedora (#9322) (diff) | |
download | synapse-d882fbca388692f475673007df4f7ac394446b46.tar.xz |
Update type hints for Cursor to match PEP 249. (#9299)
Diffstat (limited to 'synapse/storage/prepare_database.py')
-rw-r--r-- | synapse/storage/prepare_database.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/prepare_database.py b/synapse/storage/prepare_database.py index 566ea19bae..28bb2eb662 100644 --- a/synapse/storage/prepare_database.py +++ b/synapse/storage/prepare_database.py @@ -619,9 +619,9 @@ def _get_or_create_schema_state( txn.execute("SELECT version, upgraded FROM schema_version") row = txn.fetchone() - current_version = int(row[0]) if row else None - if current_version: + if row is not None: + current_version = int(row[0]) txn.execute( "SELECT file FROM applied_schema_deltas WHERE version >= ?", (current_version,), |