mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-11-05 06:13:55 +01:00
fix ruff
This commit is contained in:
parent
3f5df89c85
commit
e4f68895b3
1 changed files with 2 additions and 1 deletions
|
@ -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