mirror of
https://github.com/django/django.git
synced 2025-10-21 15:52:54 +00:00
Fixed #28982 -- Simplified code with and/or.
This commit is contained in:
parent
c2d0f8c084
commit
d7b2aa24f7
55 changed files with 98 additions and 218 deletions
|
@ -85,9 +85,7 @@ class HashedFilesMixin:
|
|||
# `name` is the base name to construct the new hashed filename from.
|
||||
parsed_name = urlsplit(unquote(name))
|
||||
clean_name = parsed_name.path.strip()
|
||||
if filename:
|
||||
filename = urlsplit(unquote(filename)).path.strip()
|
||||
filename = filename or clean_name
|
||||
filename = (filename and urlsplit(unquote(filename)).path.strip()) or clean_name
|
||||
opened = False
|
||||
if content is None:
|
||||
if not self.exists(filename):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue