diff --git a/api/migrations/0045_alter_order_latitude_alter_order_longitude.py b/api/migrations/0045_alter_order_latitude_alter_order_longitude.py new file mode 100644 index 00000000..db1bb186 --- /dev/null +++ b/api/migrations/0045_alter_order_latitude_alter_order_longitude.py @@ -0,0 +1,41 @@ +# Generated by Django 4.2.6 on 2023-10-24 23:09 + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("api", "0044_alter_markettick_fee_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="order", + name="latitude", + field=models.DecimalField( + blank=True, + decimal_places=6, + max_digits=8, + null=True, + validators=[ + django.core.validators.MinValueValidator(-90), + django.core.validators.MaxValueValidator(90), + ], + ), + ), + migrations.AlterField( + model_name="order", + name="longitude", + field=models.DecimalField( + blank=True, + decimal_places=6, + max_digits=9, + null=True, + validators=[ + django.core.validators.MinValueValidator(-180), + django.core.validators.MaxValueValidator(180), + ], + ), + ), + ] diff --git a/api/models/order.py b/api/models/order.py index 612024b9..14762134 100644 --- a/api/models/order.py +++ b/api/models/order.py @@ -136,7 +136,7 @@ class Order(models.Model): MinValueValidator(-90), MaxValueValidator(90), ], - blank=False, + blank=True, ) longitude = models.DecimalField( max_digits=9, @@ -146,7 +146,7 @@ class Order(models.Model): MinValueValidator(-180), MaxValueValidator(180), ], - blank=False, + blank=True, ) # how many sats at creation and at last check (relevant for marked to market)