Adds in some additional validators for a nicer error message
This commit is contained in:
parent
d7067dc355
commit
4647a16961
@ -50,8 +50,10 @@ class Migration(migrations.Migration):
|
||||
(
|
||||
"pages",
|
||||
models.PositiveIntegerField(
|
||||
blank=True,
|
||||
null=True,
|
||||
validators=[
|
||||
django.core.validators.MinValueValidator(1),
|
||||
],
|
||||
verbose_name="Do OCR from page 1 to this value",
|
||||
),
|
||||
),
|
||||
@ -97,6 +99,9 @@ class Migration(migrations.Migration):
|
||||
"image_dpi",
|
||||
models.PositiveIntegerField(
|
||||
null=True,
|
||||
validators=[
|
||||
django.core.validators.MinValueValidator(1),
|
||||
],
|
||||
verbose_name="Sets image DPI fallback value",
|
||||
),
|
||||
),
|
||||
|
@ -93,7 +93,7 @@ class ApplicationConfiguration(AbstractSingletonModel):
|
||||
pages = models.PositiveIntegerField(
|
||||
verbose_name=_("Do OCR from page 1 to this value"),
|
||||
null=True,
|
||||
blank=True,
|
||||
validators=[MinValueValidator(1)],
|
||||
)
|
||||
|
||||
language = models.CharField(
|
||||
@ -122,6 +122,7 @@ class ApplicationConfiguration(AbstractSingletonModel):
|
||||
image_dpi = models.PositiveIntegerField(
|
||||
verbose_name=_("Sets image DPI fallback value"),
|
||||
null=True,
|
||||
validators=[MinValueValidator(1)],
|
||||
)
|
||||
|
||||
# Can't call it clean, that's a model method
|
||||
|
Loading…
x
Reference in New Issue
Block a user