@statezero/core 0.1.44 → 0.1.45
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.
|
@@ -192,16 +192,7 @@ export class Model {
|
|
|
192
192
|
*/
|
|
193
193
|
serializeField(field) {
|
|
194
194
|
const ModelClass = this.constructor;
|
|
195
|
-
|
|
196
|
-
return this._pk;
|
|
197
|
-
// check local overrides
|
|
198
|
-
let value = this._data[field];
|
|
199
|
-
// if it's not been overridden, get it from the store
|
|
200
|
-
if (value === undefined && !isNil(this._pk)) {
|
|
201
|
-
let storedValue = modelStoreRegistry.getEntity(ModelClass, this._pk);
|
|
202
|
-
if (storedValue)
|
|
203
|
-
value = storedValue[field];
|
|
204
|
-
}
|
|
195
|
+
const value = this.getField(field);
|
|
205
196
|
// File/Image fields need special handling - extract file_path from FileObject
|
|
206
197
|
const fileFormats = ["file-path", "image-path"];
|
|
207
198
|
if (ModelClass.schema &&
|
package/package.json
CHANGED