mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #28996 -- Simplified some boolean constructs and removed trivial continue statements.
This commit is contained in:
parent
4bcec02368
commit
a38ae914d8
34 changed files with 95 additions and 159 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue