lib/flapjack/data/contact.rb in flapjack-0.7.4 vs lib/flapjack/data/contact.rb in flapjack-0.7.5

- old
+ new

@@ -335,9 +335,13 @@ # TODO check that the rest of this is safe for the update case redis.hmset("contact:#{contact_id}", *['first_name', 'last_name', 'email'].collect {|f| [f, contact_data[f]]}) unless contact_data['media'].nil? + redis.del("contact_media:#{contact_id}") + redis.del("contact_media_intervals:#{contact_id}") + redis.del("contact_pagerduty:#{contact_id}") + contact_data['media'].each_pair {|medium, details| case medium when 'pagerduty' redis.hset("contact_media:#{contact_id}", medium, details['service_key']) redis.hmset("contact_pagerduty:#{contact_id}",