Fix allow blank on order geolocation

This commit is contained in:
Reckless_Satoshi 2023-10-24 16:10:36 -07:00
parent 54a59872fb
commit d127d935a7
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
2 changed files with 43 additions and 2 deletions

View File

@ -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),
],
),
),
]

View File

@ -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)