mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Comparison for file extensions should be case insensitive (#1563)
This commit is contained in:
committed by
GitHub
parent
fd1c964c92
commit
833cd32578
@@ -79,7 +79,7 @@ class ClearableBasenameFileInput(forms.ClearableFileInput):
|
||||
|
||||
@property
|
||||
def is_img(self):
|
||||
return any(self.file.name.endswith(e) for e in ('.jpg', '.jpeg', '.png', '.gif'))
|
||||
return any(self.file.name.lower().endswith(e) for e in ('.jpg', '.jpeg', '.png', '.gif'))
|
||||
|
||||
def __str__(self):
|
||||
return os.path.basename(self.file.name).split('.', 1)[-1]
|
||||
|
||||
Reference in New Issue
Block a user