Commit 378e98ed6d5c74a0864200123d2002455f06401b
Committed by
Braulio Bhavamitra
1 parent
29249040
Exists in
master
and in
29 other branches
Fix ProfileActivity nil value
Signed-off-by: Tallys Martins <tallysmartins@yahoo.com.br>
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
app/models/profile_activity.rb
... | ... | @@ -16,6 +16,7 @@ class ProfileActivity < ActiveRecord::Base |
16 | 16 | |
17 | 17 | def self.update_activity activity |
18 | 18 | profile_activity = ProfileActivity.where(activity_id: activity.id, activity_type: activity.class.base_class.name).first |
19 | + return unless profile_activity | |
19 | 20 | profile_activity.send :copy_timestamps |
20 | 21 | profile_activity.save! |
21 | 22 | profile_activity | ... | ... |