1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-30 05:01:10 +02:00

🐛 Prevent transactions where note balances go out integer bounds

This commit is contained in:
Yohann D'ANELLO
2020-08-05 16:23:32 +02:00
parent acf7ecc4ae
commit af857d6fae
7 changed files with 164 additions and 92 deletions

View File

@ -371,8 +371,12 @@ function de_validate(id, validated) {
refreshHistory();
},
error: function (err) {
let errObj = JSON.parse(err.responseText);
let error = errObj["detail"] ? errObj["detail"] : errObj["non_field_errors"];
if (!error)
error = err.responseText;
addMsg("Une erreur est survenue lors de la validation/dévalidation " +
"de cette transaction : " + JSON.parse(err.responseText)["detail"], "danger", 10000);
"de cette transaction : " + error, "danger");
refreshBalance();
// error if this method doesn't exist. Please define it.