This reverts part of
17e659eec3e23caf5d301b33aa5019b672ecd0e8, which was
tightening checks against null and '' to avoid implicit type-casting.
This line var modified_ou = new aou().fromStoreItem( current_ou ); was
producing a fieldmapper object where certain fields were being set to
contain the string "undefined" rather than a null.
The update method would take isdeleted == "undefined" as True.
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
//** FROM HASH **/
function _fromHash (_hash) {
for ( var i=0; i < this._fields.length; i++) {
- if (_hash[this._fields[i]] !== null)
+ if (_hash[this._fields[i]] != null)
this[this._fields[i]]( _hash[this._fields[i]] );
}
return this;
var _hash = {};
var i;
for (i=0; i < this._fields.length; i++) {
- if (includeNulls || this[this._fields[i]]() !== null) {
- if (this[this._fields[i]]() === null)
+ if (includeNulls || this[this._fields[i]]() != null) {
+ if (this[this._fields[i]]() == null)
_hash[this._fields[i]] = null;
else
_hash[this._fields[i]] = '' + this[this._fields[i]]();