max amount for eboutic refills

This commit is contained in:
imperosol
2026-06-11 14:21:50 +02:00
parent 39bbbc8878
commit d41a3a524a
7 changed files with 97 additions and 40 deletions
+2 -1
View File
@@ -32,7 +32,8 @@ class CurrencyField(models.DecimalField):
res.append(MinValueValidator(self.min_value))
return [*super().validators, *res]
def check(self, **kwargs):
def check(self, **kwargs): # pragma: no cover
# this is executed during runserver, but won't run in prod
errors = super().check(**kwargs)
for name, val in ("min_value", self.min_value), ("max_value", self.max_value):
if not val: