hola-server 1.0.3 → 1.0.4
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/db/entity.js +2 -2
- package/package.json +1 -1
package/db/entity.js
CHANGED
|
@@ -258,7 +258,7 @@ class Entity {
|
|
|
258
258
|
* @returns object with code and err
|
|
259
259
|
*/
|
|
260
260
|
async create_entity(param_obj, view) {
|
|
261
|
-
const fields = view == "*" ? this.meta.create_fields : this.meta.create_fields.filter(field => field.view == view);
|
|
261
|
+
const fields = view == "*" ? this.meta.create_fields : this.meta.create_fields.filter(field => field.view == view || field.view == "*");
|
|
262
262
|
const { obj, error_field_names } = convert_type(param_obj, fields);
|
|
263
263
|
if (error_field_names.length > 0) {
|
|
264
264
|
if (is_log_error()) {
|
|
@@ -421,7 +421,7 @@ class Entity {
|
|
|
421
421
|
*
|
|
422
422
|
*/
|
|
423
423
|
async update_entity(_id, param_obj, view) {
|
|
424
|
-
const fields = view == "*" ? this.meta.update_fields : this.meta.update_fields.filter(field => field.view == view);
|
|
424
|
+
const fields = view == "*" ? this.meta.update_fields : this.meta.update_fields.filter(field => field.view == view || field.view == "*");
|
|
425
425
|
|
|
426
426
|
const { obj, error_field_names } = convert_update_type(param_obj, fields);
|
|
427
427
|
if (error_field_names.length > 0) {
|