diff options
author | Дилян Палаузов <Dilyan.Palauzov@db.com> | 2018-01-12 09:05:16 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2018-01-12 12:44:50 -0500 |
commit | a38ae914d89809aed6d79337b74a8b31b6d3849a (patch) | |
tree | 42a8465e37fc02b70d8d3f876d23947acb1a2455 /tests/invalid_models_tests/test_models.py | |
parent | 4bcec02368b7e5466f64dc17286689b16613c94b (diff) | |
download | django-a38ae914d89809aed6d79337b74a8b31b6d3849a.tar.gz |
Fixed #28996 -- Simplified some boolean constructs and removed trivial continue statements.
Diffstat (limited to 'tests/invalid_models_tests/test_models.py')
-rw-r--r-- | tests/invalid_models_tests/test_models.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/invalid_models_tests/test_models.py b/tests/invalid_models_tests/test_models.py index b271ddf55c..cfd1a7c465 100644 --- a/tests/invalid_models_tests/test_models.py +++ b/tests/invalid_models_tests/test_models.py @@ -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 |