diff --git a/machado/api/serializers.py b/machado/api/serializers.py index 3d7af28b..c2a9e7f3 100644 --- a/machado/api/serializers.py +++ b/machado/api/serializers.py @@ -161,7 +161,7 @@ def get_display(self, obj): return obj.get_display() -class JBrowseRefseqSerializer(serializers.ModelSerializer): +class JBrowseRefseqSerializer(serializers.Serializer): """JBrowse transcript serializer.""" start = serializers.SerializerMethodField() diff --git a/machado/api/views.py b/machado/api/views.py index 1a5970fb..71e07c2a 100644 --- a/machado/api/views.py +++ b/machado/api/views.py @@ -193,6 +193,8 @@ def get_queryset(self): if sotype is not None: queryset = queryset.filter(type__cv__name="sequence", type__name=sotype) + queryset = queryset.only("seqlen", "uniquename") + return queryset @method_decorator(cache_page(CACHE_TIMEOUT))