418
419
420
421
422
423
424
425
426
427
428
429
430
431
|
# File 'lib/jamf/api/jamf_pro/base_classes/oapi_object.rb', line 418
def clear_unsaved_changes
return unless self.class.mutable?
unsaved_changes.keys.each do |attr_name|
attrib_val = instance_variable_get "@#{attr_name}"
if self.class::OAPI_PROPERTIES[attr_name][:multi]
attrib_val.each { |item| item.send :clear_unsaved_changes if item.respond_to? :clear_unsaved_changes }
elsif attrib_val.respond_to? :clear_unsaved_changes
attrib_val.send :clear_unsaved_changes
end
end
ext_attrs_clear_unsaved_changes if self.class.include? Jamf::Extendable
@unsaved_changes = {}
end
|