Skip to content

Commit

Permalink
Fix allow blank on order geolocation
Browse files Browse the repository at this point in the history
  • Loading branch information
Reckless-Satoshi committed Oct 24, 2023
1 parent 54a5987 commit d127d93
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
41 changes: 41 additions & 0 deletions api/migrations/0045_alter_order_latitude_alter_order_longitude.py
Original file line number Diff line number Diff line change
@@ -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),
],
),
),
]
4 changes: 2 additions & 2 deletions api/models/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class ExpiryReasons(models.IntegerChoices):
MinValueValidator(-90),
MaxValueValidator(90),
],
blank=False,
blank=True,
)
longitude = models.DecimalField(
max_digits=9,
Expand All @@ -146,7 +146,7 @@ class ExpiryReasons(models.IntegerChoices):
MinValueValidator(-180),
MaxValueValidator(180),
],
blank=False,
blank=True,
)

# how many sats at creation and at last check (relevant for marked to market)
Expand Down

0 comments on commit d127d93

Please sign in to comment.