@xuda.io/runtime-bundle 1.0.699 → 1.0.701

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.
@@ -2500,7 +2500,7 @@ func.api.dbs_read = async function (table_id, selector, fields, sort, limit, ski
2500
2500
 
2501
2501
  return await api_utils.dbs_read(table_id, selector, fields, sort, limit, skip, cb);
2502
2502
  };
2503
- func.api.dbs_update = async function (table_id, row_id, data) {
2503
+ func.api.dbs_update = async function (table_id, row_id, data, cb) {
2504
2504
  const SESSION_ID = Object.keys(SESSION_OBJ)[0];
2505
2505
  const api_utils = await func.common.get_module(SESSION_ID, 'xuda-api-library.mjs', {
2506
2506
  func,
@@ -8597,25 +8597,26 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
8597
8597
 
8598
8598
  const fx = {
8599
8599
  update_datasource: async function () {
8600
- var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[queue_obj.dsSession];
8601
- _ds.currentRecordId = queue_obj.paramsP.currentRecordId;
8600
+ if (queue_obj?.paramsP) {
8601
+ var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[queue_obj.dsSession];
8602
+ _ds.currentRecordId = queue_obj.paramsP.currentRecordId;
8602
8603
 
8603
- var datasource_changes = {
8604
- [_ds.dsSession]: { [_ds.currentRecordId]: 'set' },
8605
- };
8606
- await func.datasource.update(SESSION_ID, datasource_changes);
8607
-
8608
- if (queue_obj.paramsP.field_id) {
8609
- datasource_changes = {
8610
- [_ds.dsSession]: {
8611
- [_ds.currentRecordId]: {
8612
- [queue_obj.paramsP.field_id]: queue_obj.paramsP.field_value,
8613
- },
8614
- },
8604
+ var datasource_changes = {
8605
+ [_ds.dsSession]: { [_ds.currentRecordId]: 'set' },
8615
8606
  };
8616
8607
  await func.datasource.update(SESSION_ID, datasource_changes);
8617
- }
8618
8608
 
8609
+ if (queue_obj.paramsP.field_id) {
8610
+ datasource_changes = {
8611
+ [_ds.dsSession]: {
8612
+ [_ds.currentRecordId]: {
8613
+ [queue_obj.paramsP.field_id]: queue_obj.paramsP.field_value,
8614
+ },
8615
+ },
8616
+ };
8617
+ await func.datasource.update(SESSION_ID, datasource_changes);
8618
+ }
8619
+ }
8619
8620
  return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
8620
8621
  },
8621
8622
  execute_xu_render_attributes: async function () {
@@ -2501,7 +2501,7 @@ func.api.dbs_read = async function (table_id, selector, fields, sort, limit, ski
2501
2501
 
2502
2502
  return await api_utils.dbs_read(table_id, selector, fields, sort, limit, skip, cb);
2503
2503
  };
2504
- func.api.dbs_update = async function (table_id, row_id, data) {
2504
+ func.api.dbs_update = async function (table_id, row_id, data, cb) {
2505
2505
  const SESSION_ID = Object.keys(SESSION_OBJ)[0];
2506
2506
  const api_utils = await func.common.get_module(SESSION_ID, 'xuda-api-library.mjs', {
2507
2507
  func,
@@ -8598,25 +8598,26 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
8598
8598
 
8599
8599
  const fx = {
8600
8600
  update_datasource: async function () {
8601
- var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[queue_obj.dsSession];
8602
- _ds.currentRecordId = queue_obj.paramsP.currentRecordId;
8601
+ if (queue_obj?.paramsP) {
8602
+ var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[queue_obj.dsSession];
8603
+ _ds.currentRecordId = queue_obj.paramsP.currentRecordId;
8603
8604
 
8604
- var datasource_changes = {
8605
- [_ds.dsSession]: { [_ds.currentRecordId]: 'set' },
8606
- };
8607
- await func.datasource.update(SESSION_ID, datasource_changes);
8608
-
8609
- if (queue_obj.paramsP.field_id) {
8610
- datasource_changes = {
8611
- [_ds.dsSession]: {
8612
- [_ds.currentRecordId]: {
8613
- [queue_obj.paramsP.field_id]: queue_obj.paramsP.field_value,
8614
- },
8615
- },
8605
+ var datasource_changes = {
8606
+ [_ds.dsSession]: { [_ds.currentRecordId]: 'set' },
8616
8607
  };
8617
8608
  await func.datasource.update(SESSION_ID, datasource_changes);
8618
- }
8619
8609
 
8610
+ if (queue_obj.paramsP.field_id) {
8611
+ datasource_changes = {
8612
+ [_ds.dsSession]: {
8613
+ [_ds.currentRecordId]: {
8614
+ [queue_obj.paramsP.field_id]: queue_obj.paramsP.field_value,
8615
+ },
8616
+ },
8617
+ };
8618
+ await func.datasource.update(SESSION_ID, datasource_changes);
8619
+ }
8620
+ }
8620
8621
  return func.UI.worker.delete_job(SESSION_ID, queue_obj.job_num);
8621
8622
  },
8622
8623
  execute_xu_render_attributes: async function () {