diff --git a/api/migrations/0043_order_latitude_order_longitude_alter_order_bond_size.py b/api/migrations/0043_order_latitude_order_longitude_alter_order_bond_size.py new file mode 100644 index 000000000..1c972c3a0 --- /dev/null +++ b/api/migrations/0043_order_latitude_order_longitude_alter_order_bond_size.py @@ -0,0 +1,52 @@ +# Generated by Django 4.2.5 on 2023-10-03 20:12 + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("api", "0042_alter_order_logs_alter_robot_avatar"), + ] + + operations = [ + migrations.AddField( + model_name="order", + name="latitude", + field=models.DecimalField( + decimal_places=6, + max_digits=8, + null=True, + validators=[ + django.core.validators.MinValueValidator(-90), + django.core.validators.MaxValueValidator(90), + ], + ), + ), + migrations.AddField( + model_name="order", + name="longitude", + field=models.DecimalField( + decimal_places=6, + max_digits=9, + null=True, + validators=[ + django.core.validators.MinValueValidator(-180), + django.core.validators.MaxValueValidator(180), + ], + ), + ), + migrations.AlterField( + model_name="order", + name="bond_size", + field=models.DecimalField( + decimal_places=2, + default=3.0, + max_digits=4, + validators=[ + django.core.validators.MinValueValidator(1.0), + django.core.validators.MaxValueValidator(15.0), + ], + ), + ), + ] diff --git a/api/models/order.py b/api/models/order.py index 7fd96c9ed..4d568381f 100644 --- a/api/models/order.py +++ b/api/models/order.py @@ -134,8 +134,8 @@ class ExpiryReasons(models.IntegerChoices): decimal_places=6, null=True, validators=[ - MinValueValidator(config(-90, cast=float)), - MaxValueValidator(config(90, cast=float)), + MinValueValidator(-90), + MaxValueValidator(90), ], blank=False, ) @@ -144,8 +144,8 @@ class ExpiryReasons(models.IntegerChoices): decimal_places=6, null=True, validators=[ - MinValueValidator(config(-180, cast=float)), - MaxValueValidator(config(180, cast=float)), + MinValueValidator(-180), + MaxValueValidator(180), ], blank=False, ) diff --git a/docker-compose.yml b/docker-compose.yml index 7b9ade4b0..08611a601 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,7 +22,6 @@ services: backend: build: . - image: backend container_name: django-dev restart: always depends_on: @@ -61,7 +60,7 @@ services: - ./frontend/static:/usr/src/robosats/static clean-orders: - image: backend + build: . restart: always container_name: clord-dev environment: @@ -74,7 +73,7 @@ services: network_mode: service:tor follow-invoices: - image: backend + build: . container_name: invo-dev restart: always depends_on: @@ -90,7 +89,7 @@ services: network_mode: service:tor telegram-watcher: - image: backend + build: . container_name: tg-dev restart: always environment: @@ -103,7 +102,7 @@ services: network_mode: service:tor celery-worker: - image: backend + build: . container_name: cele-worker-dev restart: always environment: @@ -119,7 +118,7 @@ services: network_mode: service:tor celery-beat: - image: backend + build: . container_name: cele-beat-dev restart: always environment: