[Context] Suppress warnings while editing

Don't expect consistency between composition and location fields
while an object is being edited; this avoids benign warnings
being logged. Fixes #624
This commit is contained in:
Victor Woeltjen
2016-07-14 11:10:15 -07:00
parent cd21575546
commit 1c2378b3b4

View File

@@ -65,7 +65,13 @@ define(
* which should appear as the contextual parent * which should appear as the contextual parent
*/ */
return function (domainObject, parentObject) { return function (domainObject, parentObject) {
// Don't validate while editing; consistency is not
// necessarily expected due to unsaved changes.
var editor = domainObject.getCapability('editor');
if (editor && !editor.inEditContext()) {
validate(domainObject.getId(), parentObject); validate(domainObject.getId(), parentObject);
}
return new ContextualDomainObject(domainObject, parentObject); return new ContextualDomainObject(domainObject, parentObject);
}; };
} }