minor bug fixes

This commit is contained in:
Alexander-D-Karpov 2022-11-06 12:37:54 +03:00
parent 1e8c57efaf
commit 1bf80a75b5
3 changed files with 3 additions and 2 deletions

View File

@ -294,7 +294,7 @@ SPECTACULAR_SETTINGS = {
"SERVE_INCLUDE_SCHEMA": False, "SERVE_INCLUDE_SCHEMA": False,
"SERVE_PERMISSIONS": ["rest_framework.permissions.AllowAny"], "SERVE_PERMISSIONS": ["rest_framework.permissions.AllowAny"],
"SERVERS": [ "SERVERS": [
{"url": "https://dev.akarpov.ru", "description": "Development server"}, {"url": "https://dev2.akarpov.ru", "description": "Development server"},
{"url": "http://127.0.0.1:8000", "description": "Development server"}, {"url": "http://127.0.0.1:8000", "description": "Development server"},
], ],
} }

View File

@ -173,7 +173,7 @@ class ListUpdateDicomImageNumberApi(GenericAPIView):
) )
def put(self, request, dicom_slug): def put(self, request, dicom_slug):
dicom = get_object_or_404(Dicom, slug=dicom_slug) dicom = get_object_or_404(Dicom, slug=dicom_slug)
dicom.shapes.delete() [x.delete() for x in dicom.shapes]
serializer = BaseShapeLayerSerializer( serializer = BaseShapeLayerSerializer(
data=request.data, many=True, context={"request": request} data=request.data, many=True, context={"request": request}
) )

View File

@ -58,6 +58,7 @@ class Circle(BaseShape):
return { return {
"id": self.id, "id": self.id,
"type": "circle", "type": "circle",
"layer": self.layer,
"radius": self.radius, "radius": self.radius,
"coordinates": self.coordinates, "coordinates": self.coordinates,
} }