[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

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-01-19 17:36:48 +00:00
parent 024602e530
commit 8b470dfd8a
2 changed files with 3 additions and 2 deletions

View file

@ -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")

View file

@ -1,5 +1,6 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys