Refactored code to not be able to update the object if the attribute is
not whitelisted