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 /django/utils/datastructures.py | |
parent | 4bcec02368b7e5466f64dc17286689b16613c94b (diff) | |
download | django-a38ae914d89809aed6d79337b74a8b31b6d3849a.tar.gz |
Fixed #28996 -- Simplified some boolean constructs and removed trivial continue statements.
Diffstat (limited to 'django/utils/datastructures.py')
-rw-r--r-- | django/utils/datastructures.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py index 127c6dc774..2f02a2c74d 100644 --- a/django/utils/datastructures.py +++ b/django/utils/datastructures.py @@ -275,11 +275,9 @@ class DictWrapper(dict): present). If the prefix is present, pass the value through self.func before returning, otherwise return the raw value. """ - if key.startswith(self.prefix): - use_func = True + use_func = key.startswith(self.prefix) + if use_func: key = key[len(self.prefix):] - else: - use_func = False value = super().__getitem__(key) if use_func: return self.func(value) |