Skip to content

Commit

Permalink
Modify AnalysisQCChartViewSet view to add header
Browse files Browse the repository at this point in the history
  • Loading branch information
amartyanambiar committed Aug 7, 2023
1 parent c4997a2 commit 00e1ee8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion emgapi/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down

0 comments on commit 00e1ee8

Please sign in to comment.