From 5abb1552871ee38f5679dbcbdb36cd8c44f6a3ac Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sun, 16 Aug 2020 00:02:09 +0200 Subject: [PATCH] Free the transfer lock in case of transfer error --- note_kfet/static/js/transfer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/note_kfet/static/js/transfer.js b/note_kfet/static/js/transfer.js index 5e49aa4f..c3f86239 100644 --- a/note_kfet/static/js/transfer.js +++ b/note_kfet/static/js/transfer.js @@ -327,6 +327,7 @@ $("#btn_transfer").click(function() { addMsg("Le transfert de " + pretty_money(source.quantity * dest.quantity * amount) + " de la note " + source.name + " vers la note " + dest.name + " a échoué : " + errObj["non_field_errors"], "danger"); + LOCK = false; return; } @@ -357,6 +358,7 @@ $("#btn_transfer").click(function() { addMsg("Le transfert de " + pretty_money(source.quantity * dest.quantity * amount) + " de la note " + source.name + " vers la note " + dest.name + " a échoué : " + error, "danger"); + LOCK = false; }); }); }); @@ -412,6 +414,7 @@ $("#btn_transfer").click(function() { if (!error) error = err.responseText; addMsg("Le crédit/retrait a échoué : " + error, "danger", 10000); + LOCK = false; }); } });