diff --git a/adm/templates/adm/adm_import_flow.html b/adm/templates/adm/adm_import_flow.html index c732faf..09f5740 100644 --- a/adm/templates/adm/adm_import_flow.html +++ b/adm/templates/adm/adm_import_flow.html @@ -241,11 +241,7 @@ var ncfiledata = []; //Anlegen der Standarddateien function rebuildingStandards(id){ - console.log("NCFILEDATA BEFORE RESET"); - console.log(ncfiledata); ncfiledata.splice(0, ncfiledata.length); - console.log("NCFILEDATA RESET"); - console.log(ncfiledata); $("#cloud_process_standards").show(); ncfiledata[0] = ['standardid', id]; console.log("LOADING NC FILES"); @@ -263,6 +259,7 @@ $.ajax({ url: "{% url 'api:apiswitchstandards' %}", dataType: 'json', + type: "POST", data: JSON.stringify(ncfiledata), success: function(data){ if(data['status'] == "OK"){ diff --git a/api/views.py b/api/views.py index 6da4b89..2d879b5 100644 --- a/api/views.py +++ b/api/views.py @@ -437,12 +437,12 @@ def getFileIdFromXML(xmlresponse): Pro Datei in addedfiles wird ein neues NCFile-Objekt erstellt und in addedfiles_nc gespeichert. In den Ansichten der Standards werden dann nur noch die addedfiles_nc-Elemente gesehen und verändert. ''' import re, json -@api_view(['GET'], ) +@api_view(['POST'], ) def NCSwitchStandardFiles(request): - if request.method == "GET": + if request.method == "POST": #agency = Agency.objects.get(pk=request.GET.get('agencyid')) - jsonresponse = json.dumps(request.GET) + jsonresponse = json.dumps(request.POST) json_final = json.loads(jsonresponse) standardid = False ncfiledata = False