From a38ae914d89809aed6d79337b74a8b31b6d3849a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD=20=D0=9F=D0=B0=D0=BB=D0=B0?= =?UTF-8?q?=D1=83=D0=B7=D0=BE=D0=B2?= Date: Fri, 12 Jan 2018 09:05:16 -0500 Subject: Fixed #28996 -- Simplified some boolean constructs and removed trivial continue statements. --- tests/invalid_models_tests/test_models.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'tests/invalid_models_tests/test_models.py') 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 -- cgit v1.2.1