Commit 287929d6ce5781371ba9c5a63c219456138325b8
1 parent
407b928a
Exists in
master
Fix script that process merit rules
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
script/process_merit_rules.rb
@@ -8,7 +8,7 @@ class ProcessObserver | @@ -8,7 +8,7 @@ class ProcessObserver | ||
8 | action = Merit::Action.find(changed_data[:merit_action_id]) | 8 | action = Merit::Action.find(changed_data[:merit_action_id]) |
9 | model = action.target_obj | 9 | model = action.target_obj |
10 | return if model.nil? | 10 | return if model.nil? |
11 | - new_date = YAML.load(action.target_data).created_at | 11 | + new_date = model.created_at |
12 | action.update_attribute(:created_at, new_date) | 12 | action.update_attribute(:created_at, new_date) |
13 | merit.update_attribute(:created_at, new_date) | 13 | merit.update_attribute(:created_at, new_date) |
14 | end | 14 | end |