Prevents special opes on LIQ

This commit is contained in:
Ludovic Stephan 2017-03-31 18:28:03 -03:00
parent 63cb7b7fd0
commit aa29621c7c
2 changed files with 6 additions and 1 deletions

View file

@ -86,6 +86,9 @@ function getErrorsHtml(data) {
content += '<li>Montant invalide</li>';
content += '</ul>';
}
if ('account' in data['errors']) {
content += data['errors']['account'];
}
return content;
}

View file

@ -1041,7 +1041,9 @@ def kpsul_perform_operations(request):
operationgroup.comment = operationgroup.comment.strip()
if not operationgroup.comment:
data['errors']['need_comment'] = True
return JsonResponse(data, status=400)
if data['errors']:
return JsonResponse(data, status=400)
if stop or not request.user.has_perms(required_perms):
missing_perms = get_missing_perms(required_perms, request.user)