spice-js 2.5.29 → 2.5.30
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.
|
@@ -209,8 +209,6 @@ class SpiceModel {
|
|
|
209
209
|
data = Array.of(data);
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
console.log("DAta", data);
|
|
213
|
-
|
|
214
212
|
if (_this[_ctx]) {
|
|
215
213
|
var returned = yield new _this[_ctx].state.process_fields().process(_this[_ctx], data, _this.type);
|
|
216
214
|
return returned;
|
|
@@ -981,6 +979,10 @@ class SpiceModel {
|
|
|
981
979
|
return _asyncToGenerator(function* () {
|
|
982
980
|
try {
|
|
983
981
|
// run serializers
|
|
982
|
+
if (!path_to_be_removed) {
|
|
983
|
+
path_to_be_removed = [];
|
|
984
|
+
}
|
|
985
|
+
|
|
984
986
|
if (_this14.shouldSerializerRun(args, type)) {
|
|
985
987
|
for (var i of _this14[_serializers][type]["modifiers"]) {
|
|
986
988
|
try {
|
package/package.json
CHANGED
package/src/models/SpiceModel.js
CHANGED
|
@@ -186,7 +186,6 @@ export default class SpiceModel {
|
|
|
186
186
|
data = Array.of(data)
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
console.log("DAta", data)
|
|
190
189
|
if (this[_ctx]) {
|
|
191
190
|
let returned = await new this[_ctx].state.process_fields().process(this[_ctx], data, this.type);
|
|
192
191
|
return returned;
|
|
@@ -878,7 +877,11 @@ export default class SpiceModel {
|
|
|
878
877
|
async do_serialize(data, type, old_data, args, path_to_be_removed) {
|
|
879
878
|
try {
|
|
880
879
|
// run serializers
|
|
881
|
-
|
|
880
|
+
|
|
881
|
+
if(!path_to_be_removed){
|
|
882
|
+
path_to_be_removed =[]
|
|
883
|
+
}
|
|
884
|
+
|
|
882
885
|
if (this.shouldSerializerRun(args, type)) {
|
|
883
886
|
for (let i of this[_serializers][type]["modifiers"]) {
|
|
884
887
|
try {
|
|
@@ -918,6 +921,7 @@ export default class SpiceModel {
|
|
|
918
921
|
|
|
919
922
|
// apply cleaners
|
|
920
923
|
if (type == "read") {
|
|
924
|
+
|
|
921
925
|
let props_to_clean = ["deleted", "type", ...path_to_be_removed];
|
|
922
926
|
for (let i in this.props) {
|
|
923
927
|
if (this.props[i].hide) {
|