fix: not-null constraint violation when creating ExchangeRate

This commit is contained in:
Herculino Trotta
2024-10-21 00:02:34 -03:00
parent bcb2a93f15
commit 2b5011071f

View File

@@ -21,7 +21,7 @@ class ExchangeRateSerializer(serializers.ModelSerializer):
# For write operations (POST, PUT, PATCH)
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: