Commit d6f4aa5c authored by Samuel GAIST's avatar Samuel GAIST

[database][serializers] Make DatabaseSerializer's description a CharField

Now that the underlying file is read in the
appropriate mode, make it a CharField as the
property of the same name will be called to
fill it.
parent d4f4fb55
Pipeline #42626 passed with stage
in 15 minutes and 15 seconds
......@@ -38,7 +38,7 @@ from .models import Database
class DatabaseSerializer(VersionableSerializer):
protocols = serializers.SerializerMethodField()
description = serializers.SerializerMethodField()
description = serializers.CharField()
declaration = beat_fields.JSONField()
class Meta(VersionableSerializer.Meta):
......@@ -49,9 +49,6 @@ class DatabaseSerializer(VersionableSerializer):
super(DatabaseSerializer, self).__init__(*args, **kwargs)
self.experiments_stats = {}
def get_description(self, obj):
return obj.description.decode("utf8")
def get_protocols(self, obj):
protocols_options = self.context["request"].query_params.get(
"protocols_options", []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment