@xuda.io/xuda-worker-bundle-min 1.3.841 → 1.3.843

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.
Files changed (2) hide show
  1. package/index.js +19 -9
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -60,9 +60,9 @@ func.common.find_ROWID_idx = function (_ds, rowId) {
60
60
  const index = _ds.data_feed.rows.findIndex((item) => item._ROWID === rowId);
61
61
  // }
62
62
  // If the index is -1, the ROWID was not found, so throw an error
63
- if (index === -1) {
64
- throw new Error(`ROWID "${rowId}" not found`);
65
- }
63
+ // if (index === -1) {
64
+ // throw new Error(`ROWID "${rowId}" not found`);
65
+ // }
66
66
 
67
67
  // Return the found index
68
68
  return index;
@@ -2722,16 +2722,26 @@ func.datasource.execute = async function (
2722
2722
  _ds.set_mode = "C";
2723
2723
  _ds.record_not_found = true;
2724
2724
 
2725
- if (_.isEmpty(_ds.data_feed.rows[glb.newRecord])) {
2725
+ try {
2726
+ const row_idx = func.common.find_ROWID_idx(_ds, _ds.currentRecordId);
2727
+ } catch (error) {
2726
2728
  await func.datasource.render_fields_form(
2727
2729
  SESSION_ID,
2728
2730
  dataSourceSession,
2729
- { _ROWID: "newRecord" } // { id: "newRecord", value: {} },
2730
- // null,
2731
- // false,
2732
- // "newRecord"
2731
+ { _ROWID: "newRecord" }
2733
2732
  );
2734
2733
  }
2734
+
2735
+ // if (_.isEmpty(_ds.data_feed.rows[glb.newRecord])) {
2736
+ // await func.datasource.render_fields_form(
2737
+ // SESSION_ID,
2738
+ // dataSourceSession,
2739
+ // { _ROWID: "newRecord" } // { id: "newRecord", value: {} },
2740
+ // // null,
2741
+ // // false,
2742
+ // // "newRecord"
2743
+ // );
2744
+ // }
2735
2745
  var count = await func.datasource.get_field_init_count(
2736
2746
  SESSION_ID,
2737
2747
  dataSourceSession,
@@ -3210,7 +3220,7 @@ func.datasource.run_rows_form = async function (
3210
3220
  SESSION_ID,
3211
3221
  dataSourceSession,
3212
3222
  "form",
3213
- idx
3223
+ _ds.data_feed.rows[idx]._ROWID
3214
3224
  );
3215
3225
  }
3216
3226
  // await form_continue();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle-min",
3
- "version": "1.3.841",
3
+ "version": "1.3.843",
4
4
  "description": "xuda framework min",
5
5
  "main": "index.js",
6
6
  "scripts": {