From aaf45d542245c2d209ca63f97295f5f746a41997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pave=C5=82=20Ty=C5=9Blacki?= Date: Thu, 28 Feb 2019 00:30:39 +0300 Subject: [PATCH] [2.2.x] Unified nonexistent foreign key introspection value for SQLite. Backport of b777c0675ef7aadc299844025cf1f9b53562524f from master. --- django/db/backends/sqlite3/introspection.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/django/db/backends/sqlite3/introspection.py b/django/db/backends/sqlite3/introspection.py index c8ed8b8f88..fd8accb04e 100644 --- a/django/db/backends/sqlite3/introspection.py +++ b/django/db/backends/sqlite3/introspection.py @@ -272,7 +272,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): 'unique': True, 'columns': [], 'primary_key': False, - 'foreign_key': False, + 'foreign_key': None, 'check': False, 'index': False, } @@ -290,7 +290,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): 'columns': columns, 'primary_key': False, 'unique': False, - 'foreign_key': False, + 'foreign_key': None, 'index': False, } # Get the index info @@ -307,7 +307,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): "columns": [], "primary_key": False, "unique": bool(unique), - "foreign_key": False, + "foreign_key": None, "check": False, "index": True, } @@ -337,7 +337,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): "columns": [pk_column], "primary_key": True, "unique": False, # It's not actually a unique constraint. - "foreign_key": False, + "foreign_key": None, "check": False, "index": False, }