Skip to content

Commit

Permalink
fix(coordinator): warning on drf serialializer decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
Reckless-Satoshi committed Apr 21, 2024
1 parent c4c5eb1 commit ee9b714
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion api/serializers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from decouple import config
from decimal import Decimal
from rest_framework import serializers

from .models import MarketTick, Order
Expand Down Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions chat/serializers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rest_framework import serializers

from decimal import Decimal
from chat.models import Message


Expand Down Expand Up @@ -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",
)

Expand Down Expand Up @@ -66,15 +66,15 @@ class PostMessageSerializer(serializers.ModelSerializer):

order_id = serializers.IntegerField(
required=True,
min_value=0,
min_value=Decimal(0),
help_text="Your peer's public key",
)

offset = serializers.IntegerField(
allow_null=True,
default=None,
required=False,
min_value=0,
min_value=Decimal(0),
help_text="Offset for message index to get as response",
)

Expand Down

0 comments on commit ee9b714

Please sign in to comment.