@xuda.io/xuda-worker-bundle 1.3.1255 → 1.3.1257
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +7 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -4138,7 +4138,7 @@ func.datasource.update = async function (
|
|
|
4138
4138
|
dsSession
|
|
4139
4139
|
);
|
|
4140
4140
|
// find if field is computed
|
|
4141
|
-
let
|
|
4141
|
+
let fieldComputed_propExpressions, fieldComputed_id
|
|
4142
4142
|
for await (const val of _progFields) {
|
|
4143
4143
|
|
|
4144
4144
|
const fieldId = val.data.field_id;
|
|
@@ -4148,23 +4148,24 @@ func.datasource.update = async function (
|
|
|
4148
4148
|
|
|
4149
4149
|
const _propExpressions = val.props?.propExpressions?.fieldValue
|
|
4150
4150
|
if (_propExpressions && JSON.stringify(_propExpressions).includes(field_id)) {
|
|
4151
|
-
|
|
4151
|
+
fieldComputed_propExpressions = _propExpressions
|
|
4152
|
+
fieldComputed_id = fieldId
|
|
4152
4153
|
}
|
|
4153
4154
|
}
|
|
4154
4155
|
|
|
4155
|
-
if (!
|
|
4156
|
+
if (!fieldComputed_id) return
|
|
4156
4157
|
|
|
4157
4158
|
|
|
4158
4159
|
// iterate ds rows
|
|
4159
4160
|
for (const row of _ds.data_feed?.rows || []) {
|
|
4160
4161
|
// iterate row fields
|
|
4161
4162
|
for (const [key, val] of Object.entries(row)) {
|
|
4162
|
-
if (key !==
|
|
4163
|
+
if (key !== fieldComputed_id) continue
|
|
4163
4164
|
try {
|
|
4164
4165
|
|
|
4165
4166
|
let ret = await func.expression.get(
|
|
4166
4167
|
SESSION_ID,
|
|
4167
|
-
|
|
4168
|
+
fieldComputed_propExpressions,
|
|
4168
4169
|
dsNo,
|
|
4169
4170
|
"update",
|
|
4170
4171
|
row._ROWID
|
|
@@ -4172,7 +4173,7 @@ func.datasource.update = async function (
|
|
|
4172
4173
|
|
|
4173
4174
|
const row_idx = func.common.find_ROWID_idx(_ds, row._ROWID);
|
|
4174
4175
|
|
|
4175
|
-
_ds.data_feed.rows[row_idx][
|
|
4176
|
+
_ds.data_feed.rows[row_idx][fieldComputed_id] = ret.result;
|
|
4176
4177
|
} catch (err) {
|
|
4177
4178
|
console.error(err);
|
|
4178
4179
|
}
|