Преглед изворни кода

[api] No need to add operationId again in django_request.POST

- Using django_request.POST.copy() which is by default mutable and keeps the ontent and type same.
Harshg999 пре 4 година
родитељ
комит
ea7de2e833
1 измењених фајлова са 1 додато и 4 уклоњено
  1. 1 4
      desktop/core/src/desktop/api_public.py

+ 1 - 4
desktop/core/src/desktop/api_public.py

@@ -172,10 +172,7 @@ def _patch_operation_id_request(django_request):
   if not django_request.POST.get('snippet'):
     data['snippet'] = '{"type":"mysql","result":{}}'
 
-  if django_request.POST.get('operationId'):
-    data['operationId'] = django_request.POST.get('operationId')
-
-  django_request.POST = QueryDict(mutable=True)
+  django_request.POST = django_request.POST.copy() # Makes it mutable along with copying the object
   django_request.POST.update(data)