Skip to content
Snippets Groups Projects
Commit 28e43c63 authored by Mattia Mancini's avatar Mattia Mancini
Browse files

OSB-34: fix in case of None

parent 07ed8594
No related branches found
No related tags found
2 merge requests!89Monitoring maintenance Epic branch merge,!1Resolve OSB-13 "Monitoringmaintenance "
......@@ -49,7 +49,7 @@ class RTSMSummaryPlot(viewsets.ViewSet):
check_error_summary_plot.delay(pk)
raise Http404()
if os.path.exists(uri) and os.path.isfile(uri):
if uri and os.path.exists(uri) and os.path.isfile(uri):
with open(uri, 'rb') as f_stream:
image = f_stream.read()
return HttpResponse(image, status=status.HTTP_200_OK, content_type='image/gif')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment