PATCH instead of POST

This commit is contained in:
Mattijs Vanhaverbeke
2020-05-22 12:57:58 +02:00
parent 371c5c3502
commit de5707ff06
3 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ class SaveCoordsViewSet(ReadOnlyModelViewSet):
queryset = Device.objects.all()
serializer_class = TopologyDummySerializer
@action(detail=False, methods=['post'])
@action(detail=False, methods=['patch'])
def save_coords(self, request):
results = {}
if settings.PLUGINS_CONFIG["netbox_topology_views"]["allow_coordinates_saving"]:
@@ -109,7 +109,7 @@ class SearchViewSet(ReadOnlyModelViewSet):
devicerole = request.query_params.getlist('devicerole[]', None)
if devicerole == []:
devicerole = None
tags = request.query_params.getlist('tags[]', None)
if tags == []:
tags = None