From 00e1ee895a0026c6ad4afb99e3d40e0f62d1a2fa Mon Sep 17 00:00:00 2001 From: amartyanambiar Date: Mon, 7 Aug 2023 18:34:29 +0530 Subject: [PATCH] Modify AnalysisQCChartViewSet view to add header --- emgapi/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/emgapi/views.py b/emgapi/views.py index ee8e1450c..16a320f42 100644 --- a/emgapi/views.py +++ b/emgapi/views.py @@ -931,7 +931,10 @@ def retrieve(self, request, chart=None, *args, **kwargs): if os.path.isfile(filepath): logger.info("Path %r" % filepath) with open(filepath, "r") as f: - return Response(f.read()) + data = f.read() + if chart!="nucleotide-distribution": + data = "key\tvalue" + "\n" + data + return Response( data) raise Http404()