mirror of
https://github.com/jazzband/django-avatar.git
synced 2026-03-16 22:20:30 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
Some checks failed
Test / Build (4.2, 3.10) (push) Has been cancelled
Test / Build (4.2, 3.11) (push) Has been cancelled
Test / Build (4.2, 3.12) (push) Has been cancelled
Test / Build (4.2, 3.13) (push) Has been cancelled
Test / Build (4.2, 3.14) (push) Has been cancelled
Test / Build (5.2, 3.10) (push) Has been cancelled
Test / Build (5.2, 3.11) (push) Has been cancelled
Test / Build (5.2, 3.12) (push) Has been cancelled
Test / Build (5.2, 3.13) (push) Has been cancelled
Test / Build (5.2, 3.14) (push) Has been cancelled
Test / Build (6.0.*, 3.10) (push) Has been cancelled
Test / Build (6.0.*, 3.11) (push) Has been cancelled
Test / Build (6.0.*, 3.12) (push) Has been cancelled
Test / Build (6.0.*, 3.13) (push) Has been cancelled
Test / Build (6.0.*, 3.14) (push) Has been cancelled
Some checks failed
Test / Build (4.2, 3.10) (push) Has been cancelled
Test / Build (4.2, 3.11) (push) Has been cancelled
Test / Build (4.2, 3.12) (push) Has been cancelled
Test / Build (4.2, 3.13) (push) Has been cancelled
Test / Build (4.2, 3.14) (push) Has been cancelled
Test / Build (5.2, 3.10) (push) Has been cancelled
Test / Build (5.2, 3.11) (push) Has been cancelled
Test / Build (5.2, 3.12) (push) Has been cancelled
Test / Build (5.2, 3.13) (push) Has been cancelled
Test / Build (5.2, 3.14) (push) Has been cancelled
Test / Build (6.0.*, 3.10) (push) Has been cancelled
Test / Build (6.0.*, 3.11) (push) Has been cancelled
Test / Build (6.0.*, 3.12) (push) Has been cancelled
Test / Build (6.0.*, 3.13) (push) Has been cancelled
Test / Build (6.0.*, 3.14) (push) Has been cancelled
for more information, see https://pre-commit.ci
This commit is contained in:
parent
753d29f017
commit
ac666b4bb2
2 changed files with 3 additions and 2 deletions
|
|
@ -42,11 +42,11 @@ def avatar_path_handler(
|
|||
# Filename already stored in database
|
||||
filename = instance.avatar.name
|
||||
if ext:
|
||||
(root, oldext) = os.path.splitext(filename)
|
||||
root, oldext = os.path.splitext(filename)
|
||||
filename = root + "." + ext.lower()
|
||||
else:
|
||||
# File doesn't exist yet
|
||||
(root, oldext) = os.path.splitext(filename)
|
||||
root, oldext = os.path.splitext(filename)
|
||||
if settings.AVATAR_HASH_FILENAMES:
|
||||
if settings.AVATAR_RANDOMIZE_HASHES:
|
||||
root = binascii.hexlify(os.urandom(16)).decode("ascii")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
"""Django's command-line utility for administrative tasks."""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue