Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Allow posting data as dict by jquery

Marcin Gębala1c953644fe92
diff --git a/saleor/dashboard/product/api.py b/saleor/dashboard/product/api.py
index aee139a042..6baef07ddb 100644
--- a/saleor/dashboard/product/api.py
+++ b/saleor/dashboard/product/api.py
@@ -20,7 +20,7 @@ class ReorderProductImagesSerializer(serializers.Serializer):
@renderer_classes([renderers.JSONRenderer])
def reorder_product_images(request, product_pk):
product = get_object_or_404(Product, pk=product_pk)
- serializer = ReorderProductImagesSerializer(data=request.data, many=True)
+ serializer = ReorderProductImagesSerializer(data=request.data['data'], many=True)
if serializer.is_valid():
for item in serializer.data:
pk, order = item['pk'], item['order']