Skip to content
Snippets Groups Projects
Commit 1d0f6986 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[common][serializers] Fix fork_of field type

It was a JSONField however it should be a CharField.
It worked because the DRF JSONField does not actually
do type checks so a string can be dumped and it passes
the validation successfully.
parent f8271392
No related branches found
No related tags found
1 merge request!327Refactor update creation api
......@@ -364,7 +364,7 @@ class ContributionModSerializer(serializers.ModelSerializer):
class ContributionCreationSerializer(ContributionModSerializer):
fork_of = serializers.JSONField(required=False)
fork_of = serializers.CharField(required=False)
previous_version = serializers.CharField(required=False)
version = serializers.IntegerField(min_value=1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment