From ede4c121cc2ce4f91b0dc4476cadbf28a1a240b4 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Tue, 21 May 2013 11:36:58 +0100 Subject: Load all alert properties when updating. --- lib/mauve/alert.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/mauve/alert.rb b/lib/mauve/alert.rb index e6d1bae..24b9dae 100644 --- a/lib/mauve/alert.rb +++ b/lib/mauve/alert.rb @@ -824,7 +824,10 @@ module Mauve # alert.id = Alert.remove_html(alert.id.to_s) - alert_db = first(:alert_id => alert.id, :source => update.source) || + # + # Load the database alert, and all its properties, since we're updating. + # + alert_db = first(:alert_id => alert.id, :source => update.source, :fields => Alert.properties) || new(:alert_id => alert.id, :source => update.source) ## -- cgit v1.2.1