Skip to content

Commit

Permalink
Save the updated widget timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
d-m-u committed Oct 16, 2019
1 parent b7c9523 commit 265cd46
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/models/miq_widget.rb
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,7 @@ def find_or_build_contents_for_user(group, user, timezone = nil)
settings_for_build[:user_id] = user.id if user
settings_for_build[:timezone] = timezone if timezone
contents = miq_widget_contents.find_by(settings_for_build) || miq_widget_contents.build(settings_for_build)
contents.updated_at = Time.now.utc # Force updated timestamp to change when saved even if the new contents are the same

contents
contents.tap { |c| c.update!(:updated_at => Time.now.utc) }
end

# TODO: group/user support
Expand Down

0 comments on commit 265cd46

Please sign in to comment.