diff --git a/beat/web/databases/serializers.py b/beat/web/databases/serializers.py index 23edc5002a2e278e83f031a8aff0c5bb7eafca6d..d7001d3d91d46609720fce44fe089bcb7d684b95 100644 --- a/beat/web/databases/serializers.py +++ b/beat/web/databases/serializers.py @@ -30,7 +30,6 @@ from django.conf import settings from rest_framework import serializers from ..common.serializers import VersionableSerializer -from ..common.fields import JSONSerializerField from .models import Database from .exceptions import DatabaseCreationError @@ -41,7 +40,7 @@ import beat.core.database class DatabaseSerializer(VersionableSerializer): protocols = serializers.SerializerMethodField() description = serializers.SerializerMethodField() - declaration = JSONSerializerField() + declaration = serializers.JSONField() class Meta(VersionableSerializer.Meta): model = Database @@ -88,7 +87,7 @@ class DatabaseSerializer(VersionableSerializer): class DatabaseCreationSerializer(serializers.ModelSerializer): code = serializers.CharField(required=False) - declaration = JSONSerializerField(required=False) + declaration = serializers.JSONField(required=False) description = serializers.CharField(required=False, allow_blank=True) previous_version = serializers.CharField(required=False) version = serializers.IntegerField(min_value=1)