Commit 3630b49b authored by Philip Liberato's avatar Philip Liberato Committed by Tim Graham
Browse files

Fixed #26613 -- Made sqlite3 optional in SchemaEditor.quote_value().

parent 5f23f904
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -36,9 +36,11 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
        # The backend "mostly works" without this function and there are use
        # cases for compiling Python without the sqlite3 libraries (e.g.
        # security hardening).
        import sqlite3
        try:
            import sqlite3
            value = sqlite3.adapt(value)
        except ImportError:
            pass
        except sqlite3.ProgrammingError:
            pass
        # Manual emulation of SQLite parameter quoting