mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-25 01:58:54 +02:00
fix: not-null constraint violation when creating ExchangeRate
This commit is contained in:
@@ -21,7 +21,7 @@ class ExchangeRateSerializer(serializers.ModelSerializer):
|
|||||||
|
|
||||||
# For write operations (POST, PUT, PATCH)
|
# For write operations (POST, PUT, PATCH)
|
||||||
to_currency_id = serializers.PrimaryKeyRelatedField(
|
to_currency_id = serializers.PrimaryKeyRelatedField(
|
||||||
queryset=Currency.objects.all(), source="from_currency", write_only=True
|
queryset=Currency.objects.all(), source="to_currency", write_only=True
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|||||||
Reference in New Issue
Block a user