Просмотр исходного кода

Fixed #28854 -- Replaced type(True) with bool in sqlite's SchemaEditor.

Дилян Палаузов 7 лет назад
Родитель
Сommit
3308085838
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      django/db/backends/sqlite3/schema.py

+ 1 - 1
django/db/backends/sqlite3/schema.py

@@ -37,7 +37,7 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
         except sqlite3.ProgrammingError:
             pass
         # Manual emulation of SQLite parameter quoting
-        if isinstance(value, type(True)):
+        if isinstance(value, bool):
             return str(int(value))
         elif isinstance(value, (Decimal, float, int)):
             return str(value)