Compare commits

..

No commits in common. "e4f68895b324c0c5a0c98ffec505f5140725ef3b" and "5e741dd19753dfe79db50e9812a1661f7076f477" have entirely different histories.

2 changed files with 4 additions and 5 deletions

View file

@ -31,7 +31,7 @@ repos:
- id: django-upgrade
args: [--target-version, "4.1"]
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.4.0
hooks:
- id: black
args: [--target-version, py311]
@ -40,7 +40,7 @@ repos:
hooks:
- id: djhtml
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.2
rev: v0.4.1
hooks:
- id: ruff
args: [--fix]
@ -50,7 +50,7 @@ repos:
- id: prettier
types_or: [javascript, css]
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.1.1
rev: v9.1.0
hooks:
- id: eslint
args: [--fix]

View file

@ -164,8 +164,7 @@ class CharacterCapability:
def validate_image(fieldfile_obj, megabytes_limit: float):
filesize = fieldfile_obj.file.size
if filesize > megabytes_limit * 1024 * 1024:
msg = f"La taille maximale est de {megabytes_limit}Mo"
raise ValidationError(msg)
raise ValidationError("La taille maximale est de %sMo" % str(megabytes_limit))
class Character(models.Model):