0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-30 01:46:24 +01:00

Fix Sqlite FTS5 compatibility check

As per https://github.com/wagtail/wagtail/issues/7798#issuecomment-1021544265 - the direct query against the sqlite3 library will fail with sqlite3.OperationalError, not django.db.OperationalError.
This commit is contained in:
Matt Westcott 2022-01-25 19:42:42 +00:00 committed by Matt Westcott
parent 5258f2899b
commit 952e681fe6

View File

@ -14,7 +14,7 @@ def fts5_available():
tmp_db = sqlite3.connect(':memory:')
try:
tmp_db.execute('CREATE VIRTUAL TABLE fts5test USING fts5 (data);')
except OperationalError:
except sqlite3.OperationalError:
return False
finally:
tmp_db.close()