From c69e4bc69166b2d752b437a651dfa91f8b53ecfd Mon Sep 17 00:00:00 2001 From: Дилян Палаузов Date: Mon, 6 Nov 2017 10:23:29 -0500 Subject: Fixed #28769 -- Replaced 'x if x else y' with 'x or y'. --- django/db/backends/base/introspection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/db/backends/base') diff --git a/django/db/backends/base/introspection.py b/django/db/backends/base/introspection.py index 27a3cb2b87..154ae22bf1 100644 --- a/django/db/backends/base/introspection.py +++ b/django/db/backends/base/introspection.py @@ -130,7 +130,7 @@ class BaseDatabaseIntrospection: # we don't need to reset the sequence. if f.remote_field.through is None: sequence = self.get_sequences(cursor, f.m2m_db_table()) - sequence_list.extend(sequence if sequence else [{'table': f.m2m_db_table(), 'column': None}]) + sequence_list.extend(sequence or [{'table': f.m2m_db_table(), 'column': None}]) return sequence_list def get_sequences(self, cursor, table_name, table_fields=()): -- cgit v1.3