mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #28996 -- Simplified some boolean constructs and removed trivial continue statements.
This commit is contained in:
committed by
Tim Graham
parent
4bcec02368
commit
a38ae914d8
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user