Correction code HTTP K-Psul
- Corrige le code HTTP de 400 (BAD REQUEST) à 403 (FORBIDDEN) dans le cas où l'utilisateur authentifié n'a pas les permissions nécessaires pour enregistrer une commande K-Psul
This commit is contained in:
parent
11452d7633
commit
726f42c469
1 changed files with 1 additions and 1 deletions
|
@ -465,7 +465,7 @@ def kpsul_perform_operations(request):
|
|||
required_perms if not request.user.has_perm(perm)
|
||||
)]
|
||||
data['errors'].append({'missing_perms': missing_perms })
|
||||
return JsonResponse(data, status=400)
|
||||
return JsonResponse(data, status=403)
|
||||
|
||||
# If 1 perm is required, saving who perform the operations
|
||||
if len(required_perms) > 0:
|
||||
|
|
Loading…
Reference in a new issue