vendor/components/indefinido-indemma/build/release.js in ende-0.4.6 vs vendor/components/indefinido-indemma/build/release.js in ende-0.4.7

- old
+ new

@@ -21127,11 +21127,11 @@ for (name in this) { if (observable.ignores.indexOf(name) !== -1) { continue; } nested = this.nested_attributes.indexOf(name) !== -1; - if (!nested && (definition.belongs_to.indexOf(name) !== -1 || definition.has_one.indexOf(name) !== -1)) { + if (!nested && (definition.belongs_to.indexOf(name) !== -1 || definition.has_one.indexOf(name) !== -1 || definition.has_many.indexOf(name) !== -1)) { continue; } value = this[name]; if (value == null) { continue; @@ -21141,10 +21141,13 @@ } if (type(value) === 'object') { if (nested) { json["" + name + "_attributes"] = value.json(methods[name]); } else if ((value.toJSON != null) || (value.json != null)) { + if (value.resource) { + continue; + } if (value.json != null) { json[name] = value.json(methods[name]); } else { json[name] = value.toJSON(methods[name]); } @@ -21170,9 +21173,10 @@ delete json.element; delete json["default"]; delete json.lock; delete json.validated; delete json.validation; + delete json.errors; return json; } } };