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

[experiments][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 1d0f6986
No related branches found
No related tags found
1 merge request!327Refactor update creation api
...@@ -54,7 +54,7 @@ from .models import Experiment, Block ...@@ -54,7 +54,7 @@ from .models import Experiment, Block
class ExperimentCreationSerializer(serializers.ModelSerializer): class ExperimentCreationSerializer(serializers.ModelSerializer):
declaration = beat_fields.JSONField() declaration = beat_fields.JSONField()
description = serializers.CharField(required=False, allow_blank=True) description = serializers.CharField(required=False, allow_blank=True)
fork_of = beat_fields.JSONField(required=False) fork_of = serializers.CharField(required=False)
toolchain = serializers.CharField() toolchain = serializers.CharField()
class Meta: class Meta:
......
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