Cédric Krier pushed to branch branch/default at Tryton / Tryton
Commits: d3372037 by Cédric Krier at 2023-05-17T18:27:02+02:00 Use for-of statement to loop over fieldnames array - - - - - 1 changed file: - sao/src/model.js Changes: ===================================== sao/src/model.js ===================================== @@ -1065,7 +1065,7 @@ if ((fieldnames.length == 1) || (values.id === undefined)) { changes = []; - for (const fieldname in fieldnames) { + for (const fieldname of fieldnames) { changes.push(this.model.execute( 'on_change_' + fieldname, [values], this.get_context(), false)); @@ -1136,7 +1136,7 @@ if ((fieldnames.length == 1) || (values.id === undefined)) { result = {}; - for (const fieldname in fieldnames) { + for (const fieldname of fieldnames) { result[fieldname] = this.model.execute( 'on_change_with_' + fieldname, [values], this.get_context(), false); @@ -1165,7 +1165,7 @@ if ((fieldnames.length == 1) || (values.id === undefined)) { result = {}; - for (const fieldname in fieldnames) { + for (const fieldname of fieldnames) { result[fieldname] = this.model.execute( 'on_change_with_' + fieldname, [values], this.get_context(), false); View it on Heptapod: https://foss.heptapod.net/tryton/tryton/-/commit/d33720378f99517d7447f0e3bcdcc36b8e0611d5 -- View it on Heptapod: https://foss.heptapod.net/tryton/tryton/-/commit/d33720378f99517d7447f0e3bcdcc36b8e0611d5 You're receiving this email because of your account on foss.heptapod.net.