Add filter to cancel_opes
This commit is contained in:
parent
034a661444
commit
659b20891e
2 changed files with 7 additions and 5 deletions
|
@ -45,7 +45,7 @@ class KPsulManager {
|
|||
var that = this ;
|
||||
$(this.history).on("cancel_done", function(e) {
|
||||
that.reset(true);
|
||||
that.focus;
|
||||
that.focus();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1236,10 +1236,12 @@ 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(lambda s: int(s),
|
||||
request.POST.getlist('opes[]', [])))
|
||||
transfers_post = set(map(lambda s: int(s),
|
||||
request.POST.getlist('transfers[]', [])))
|
||||
opes_post = (
|
||||
set(map(int, filter(None, request.POST.getlist('opes[]', []))))
|
||||
)
|
||||
transfers_post = (
|
||||
set(map(int, filter(None, request.POST.getlist('transfers[]', []))))
|
||||
)
|
||||
except ValueError:
|
||||
return JsonResponse(data, status=400)
|
||||
|
||||
|
|
Loading…
Reference in a new issue