From 2a28ae0f6cbe122a955fd401c20d22b9728dd877 Mon Sep 17 00:00:00 2001
From: Samuel Gaist <samuel.gaist@idiap.ch>
Date: Thu, 23 Apr 2020 15:23:52 +0200
Subject: [PATCH] [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.
---
 beat/web/experiments/serializers.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/beat/web/experiments/serializers.py b/beat/web/experiments/serializers.py
index d47bb6f83..84cb3fe22 100755
--- a/beat/web/experiments/serializers.py
+++ b/beat/web/experiments/serializers.py
@@ -54,7 +54,7 @@ from .models import Experiment, Block
 class ExperimentCreationSerializer(serializers.ModelSerializer):
     declaration = beat_fields.JSONField()
     description = serializers.CharField(required=False, allow_blank=True)
-    fork_of = beat_fields.JSONField(required=False)
+    fork_of = serializers.CharField(required=False)
     toolchain = serializers.CharField()
 
     class Meta:
-- 
GitLab