Fix image path construction
Some checks failed
CI / build (20.x, 3.10) (push) Has been cancelled
CI / build (20.x, 3.11) (push) Has been cancelled
CI / build (20.x, 3.12) (push) Has been cancelled

This commit is contained in:
Daniel Sheppard 2025-07-30 23:14:45 -05:00
parent db805053d9
commit 8fd8493d11

View File

@ -211,7 +211,7 @@ class ImageAttachmentViewSet(NetBoxModelViewSet):
def download(self, request, pk, *args, **kwargs):
obj = get_object_or_404(self.queryset, pk=pk)
# Render and return the elevation as an SVG drawing with the correct content type
return serve(request, obj.image.path, document_root=settings.MEDIA_ROOT)
return serve(request, obj.image.name, document_root=settings.MEDIA_ROOT)
#