diff --git a/beat/web/plotters/serializers.py b/beat/web/plotters/serializers.py index e16fc70cfab5c6be36eeb6985a89142ebb19df92..6a8d5cb260f16ad0e16a29c6febd1b2482d31dc8 100644 --- a/beat/web/plotters/serializers.py +++ b/beat/web/plotters/serializers.py @@ -112,6 +112,7 @@ class PlotterParameterCreationFailedException(Exception): pass class PlotterParameterCreationSerializer(ContributionCreationSerializer): + data = serializers.JSONField(required=False) class Meta(ContributionCreationSerializer.Meta): model = PlotterParameter @@ -223,7 +224,6 @@ class FullPlotterParameterSerializer(PlotterParameterAllSerializer): def get_plotters(self, obj): all_plotters = Plotter.objects.all() - serializer = FullPlotterSerializer results = {} for plotter in all_plotters.iterator(): serializer = FullPlotterSerializer(plotter, context=self.context, fields=['id', 'accessibility', 'modifiable', 'deletable', 'is_owner', 'name', 'fork_of', 'last_version', 'previous_version', 'short_description', 'description', 'version', 'creation_date', 'data', 'sample_data', 'declaration'])