biz9-logic 4.8.368 → 4.8.369

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 (3) hide show
  1. package/biz9_config +1 -1
  2. package/index.js +19 -17
  3. package/package.json +1 -1
package/biz9_config CHANGED
@@ -1,4 +1,4 @@
1
- VERSION='8.4.8'
1
+ VERSION='8.4.9'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/index.js CHANGED
@@ -1384,23 +1384,6 @@ class User_Logic {
1384
1384
  req.session.user=null;
1385
1385
  delete req.session.user;
1386
1386
  }
1387
- static get_not_found = (user_id,option) =>{
1388
- if(!user_id){
1389
- user_id=0;
1390
- }
1391
- let user = User_Logic.get_test("",{get_blank:true})
1392
- user.id = 0;
1393
- user.id_key = user_id;
1394
- user.title = "User Not Found";
1395
- user.first_name = "User Not Found";
1396
- user.title_url = Str.get_title_url(user.title);
1397
- user.images = [];
1398
- user.items = [];
1399
- if(option.app_id){
1400
- user.app_id = option.app_id;
1401
- }
1402
- return user;
1403
- };
1404
1387
  static get_test = (title,option) =>{
1405
1388
  [title,option] = Field_Logic.get_option_title(title,option);
1406
1389
  option = Field_Logic.get_option(DataType.USER,option?option:{});
@@ -1504,6 +1487,7 @@ class App_Logic {
1504
1487
  return {data_type:data_type,filter:filter,sort_by:sort_by,page_current:page_current,page_size:page_size};
1505
1488
  }
1506
1489
  static get_not_found = (data_type,id,option) =>{
1490
+ if(data_type != DataType.USER){
1507
1491
  if(!id){
1508
1492
  id=0;
1509
1493
  }
@@ -1518,6 +1502,24 @@ class App_Logic {
1518
1502
  item.app_id = option.app_id;
1519
1503
  }
1520
1504
  return item;
1505
+ }else{
1506
+ if(!user_id){
1507
+ user_id=0;
1508
+ }
1509
+ let user = User_Logic.get_test("",{get_blank:true})
1510
+ user.id = 0;
1511
+ user.id_key = user_id;
1512
+ user.title = "User Not Found";
1513
+ user.first_name = "User Not Found";
1514
+ user.title_url = Str.get_title_url(user.title);
1515
+ user.images = [];
1516
+ user.items = [];
1517
+ if(option.app_id){
1518
+ user.app_id = option.app_id;
1519
+ }
1520
+ return user;
1521
+ }
1522
+
1521
1523
  };
1522
1524
  static get_search_query(search){
1523
1525
  let url = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.8.368",
3
+ "version": "4.8.369",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"