Merge branch 'Aufinal/hotfix/liq_withdraw' into 'master'

K-Fêt :
- Empêche les retraits/charges sur LIQ

See merge request !205
This commit is contained in:
Aurélien Delobelle 2017-03-31 23:49:33 +02:00
commit 1286606f7a
2 changed files with 6 additions and 1 deletions

View file

@ -133,6 +133,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,6 +1041,8 @@ def kpsul_perform_operations(request):
operationgroup.comment = operationgroup.comment.strip()
if not operationgroup.comment:
data['errors']['need_comment'] = True
if data['errors']:
return JsonResponse(data, status=400)
if stop or not request.user.has_perms(required_perms):