WIP: Aureplop/kpsul js refactor #501

Draft
delobell wants to merge 215 commits from aureplop/kpsul_js_refactor into master
Showing only changes of commit 49bef61e53 - Show all commits

View file

@ -1102,7 +1102,9 @@ def kpsul_cancel_operations(request):
# Checking if BAD REQUEST (opes_pk not int or not existing)
try:
# Set pour virer les doublons
opes_post = set(map(int, filter(None, request.POST.getlist('operations[]', []))))
opes_post = set(map(lambda s: int(s.split()[1]),
filter(lambda s: s.split()[0] == 'ope',
request.POST.getlist('operations[]', []))))
except ValueError:
return JsonResponse(data, status=400)
opes_all = (