mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 12:11:35 +00:00
fix(coordinator): warning on drf serialializer decimal
This commit is contained in:
parent
c4c5eb1268
commit
ee9b7147e9
@ -1,4 +1,5 @@
|
||||
from decouple import config
|
||||
from decimal import Decimal
|
||||
from rest_framework import serializers
|
||||
|
||||
from .models import MarketTick, Order
|
||||
@ -583,7 +584,7 @@ class UpdateOrderSerializer(serializers.Serializer):
|
||||
)
|
||||
routing_budget_ppm = serializers.IntegerField(
|
||||
default=0,
|
||||
min_value=0,
|
||||
min_value=Decimal(0),
|
||||
max_value=100_001,
|
||||
allow_null=True,
|
||||
required=False,
|
||||
|
@ -1,5 +1,5 @@
|
||||
from rest_framework import serializers
|
||||
|
||||
from decimal import Decimal
|
||||
from chat.models import Message
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ class ChatSerializer(serializers.ModelSerializer):
|
||||
allow_null=True,
|
||||
default=None,
|
||||
required=False,
|
||||
min_value=0,
|
||||
min_value=Decimal(0),
|
||||
help_text="Offset for message index to get as response",
|
||||
)
|
||||
|
||||
@ -66,7 +66,7 @@ class PostMessageSerializer(serializers.ModelSerializer):
|
||||
|
||||
order_id = serializers.IntegerField(
|
||||
required=True,
|
||||
min_value=0,
|
||||
min_value=Decimal(0),
|
||||
help_text="Your peer's public key",
|
||||
)
|
||||
|
||||
@ -74,7 +74,7 @@ class PostMessageSerializer(serializers.ModelSerializer):
|
||||
allow_null=True,
|
||||
default=None,
|
||||
required=False,
|
||||
min_value=0,
|
||||
min_value=Decimal(0),
|
||||
help_text="Offset for message index to get as response",
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user