Skip to content
Snippets Groups Projects
Commit 8277c09c authored by Bastien Abadie's avatar Bastien Abadie
Browse files

Merge branch 'openapi-rotation-min-value' into 'master'

Add a missing minimum value on Element.rotation_angle

See merge request !1517
parents 4c8e43a8 d679c609
No related branches found
No related tags found
1 merge request!1517Add a missing minimum value on Element.rotation_angle
# Generated by Django 3.2.3 on 2021-11-03 09:27
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('documents', '0044_remove_metadata_index'),
]
operations = [
migrations.AlterField(
model_name='element',
name='rotation_angle',
field=models.SmallIntegerField(default=0, help_text='Clockwise rotation to apply to the image after cropping, in degrees.', validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(359)]),
),
]
......@@ -164,7 +164,7 @@ class Element(IndexableModel):
polygon = LinearRingField(srid=0, null=True, blank=True)
rotation_angle = models.SmallIntegerField(
validators=[MaxValueValidator(359)],
validators=[MinValueValidator(0), MaxValueValidator(359)],
default=0,
help_text='Clockwise rotation to apply to the image after cropping, in degrees.',
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment