aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2013-05-21 11:36:58 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2013-05-21 11:36:58 +0100
commitede4c121cc2ce4f91b0dc4476cadbf28a1a240b4 (patch)
treed485c23c5bde81d20d63392bb504b591180aa062 /lib
parentee3de8ad2fa61aaa5261deecd5991043b6a57630 (diff)
Load all alert properties when updating.
Diffstat (limited to 'lib')
-rw-r--r--lib/mauve/alert.rb5
1 files changed, 4 insertions, 1 deletions
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)
##