mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-11-23 06:58:02 +01:00
Compare commits
2 commits
5e741dd197
...
e4f68895b3
Author | SHA1 | Date | |
---|---|---|---|
e4f68895b3 | |||
|
3f5df89c85 |
2 changed files with 5 additions and 4 deletions
|
@ -31,7 +31,7 @@ repos:
|
||||||
- id: django-upgrade
|
- id: django-upgrade
|
||||||
args: [--target-version, "4.1"]
|
args: [--target-version, "4.1"]
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 24.4.0
|
rev: 24.4.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
args: [--target-version, py311]
|
args: [--target-version, py311]
|
||||||
|
@ -40,7 +40,7 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: djhtml
|
- id: djhtml
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.4.1
|
rev: v0.4.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: ruff
|
- id: ruff
|
||||||
args: [--fix]
|
args: [--fix]
|
||||||
|
@ -50,7 +50,7 @@ repos:
|
||||||
- id: prettier
|
- id: prettier
|
||||||
types_or: [javascript, css]
|
types_or: [javascript, css]
|
||||||
- repo: https://github.com/pre-commit/mirrors-eslint
|
- repo: https://github.com/pre-commit/mirrors-eslint
|
||||||
rev: v9.1.0
|
rev: v9.1.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: eslint
|
- id: eslint
|
||||||
args: [--fix]
|
args: [--fix]
|
||||||
|
|
|
@ -164,7 +164,8 @@ class CharacterCapability:
|
||||||
def validate_image(fieldfile_obj, megabytes_limit: float):
|
def validate_image(fieldfile_obj, megabytes_limit: float):
|
||||||
filesize = fieldfile_obj.file.size
|
filesize = fieldfile_obj.file.size
|
||||||
if filesize > megabytes_limit * 1024 * 1024:
|
if filesize > megabytes_limit * 1024 * 1024:
|
||||||
raise ValidationError("La taille maximale est de %sMo" % str(megabytes_limit))
|
msg = f"La taille maximale est de {megabytes_limit}Mo"
|
||||||
|
raise ValidationError(msg)
|
||||||
|
|
||||||
|
|
||||||
class Character(models.Model):
|
class Character(models.Model):
|
||||||
|
|
Loading…
Reference in a new issue