lib/things/reference/record.rb in things-client-0.2.3 vs lib/things/reference/record.rb in things-client-0.2.4
- old
+ new
@@ -75,10 +75,11 @@
properties.each do |property|
if value = self.send(property)
self.reference.send(property).set(value.respond_to?(:reference) ? value.reference : value)
else
begin
- self.reference.send(property).delete
+ # Check if the original value was not empty and remove it if wasn't
+ self.reference.send(property).delete if self.reference.send(property).get != :missing_value
rescue
end
end
end
end
\ No newline at end of file