changeset 059dc0ba04c4 in sao:5.0
details: https://hg.tryton.org/sao?cmd=changeset&node=059dc0ba04c4
description:
        Store only once record removed or deleted

        issue10236
        review351891002
        (grafted from c10a8104cf4147260091529263020480df86d61a)
diffstat:

 src/model.js |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 82eb4aeb7bb9 -r 059dc0ba04c4 src/model.js
--- a/src/model.js      Fri Apr 30 13:46:02 2021 +0200
+++ b/src/model.js      Sun May 02 10:59:12 2021 +0200
@@ -193,13 +193,17 @@
                         this.record_deleted.splice(
                                 this.record_deleted.indexOf(record), 1);
                     }
-                    this.record_removed.push(record);
+                    if (!~this.record_removed.indexOf(record)) {
+                        this.record_removed.push(record);
+                    }
                 } else {
                     if (~this.record_removed.indexOf(record)) {
                         this.record_removed.splice(
                                 this.record_removed.indexOf(record), 1);
                     }
-                    this.record_deleted.push(record);
+                    if (!~this.record_deleted.indexOf(record)) {
+                        this.record_deleted.push(record);
+                    }
                 }
             }
             if (record.group.parent) {

Reply via email to