Skip to content

Commit

Permalink
MiqUserRole.seed save if changed?
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrock committed Jan 25, 2018
1 parent a050ac0 commit 3c5a245
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/miq_user_role.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ def self.seed_from_array(roles, array, merge_features = false)
new_settings = hash.delete(:settings) || {}
role.settings.merge!(new_settings)
end
role.update_attributes(hash.except(:id))
role.attributes = hash.except(:id)
role.save if role.changed?
end
end

Expand Down

0 comments on commit 3c5a245

Please sign in to comment.