Fixed #28996 -- Simplified some boolean constructs and removed trivial continue statements.

This commit is contained in:
Дилян Палаузов 2018-01-12 09:05:16 -05:00 committed by Tim Graham
parent 4bcec02368
commit a38ae914d8
34 changed files with 95 additions and 159 deletions

View file

@ -17,13 +17,8 @@ def get_max_column_name_length():
for db in settings.DATABASES:
connection = connections[db]
max_name_length = connection.ops.max_name_length()
if max_name_length is None or connection.features.truncates_names:
continue
else:
if allowed_len is None:
allowed_len = max_name_length
db_alias = db
elif max_name_length < allowed_len:
if max_name_length is not None and not connection.features.truncates_names:
if allowed_len is None or max_name_length < allowed_len:
allowed_len = max_name_length
db_alias = db