change render_format to render for svg elevations

This commit is contained in:
John Anderson
2019-12-11 17:33:58 -05:00
parent 53f5d162b4
commit c86b9267f5
4 changed files with 12 additions and 12 deletions

View File

@@ -218,7 +218,7 @@ class RackViewSet(CustomFieldModelViewSet):
return Response(serializer.errors, 400)
data = serializer.validated_data
if data['render_format'] == 'svg':
if data['render'] == 'svg':
# Render and return the elevation as an SVG drawing with the correct content type
drawing = rack.get_elevation_svg(data['face'], data['unit_width'], data['unit_height'])
return HttpResponse(drawing.tostring(), content_type='image/svg+xml')