Skip to content

Commit

Permalink
Merge pull request #2099 from martinpovolny/alerts_regression
Browse files Browse the repository at this point in the history
Fix a regression in alerts.
  • Loading branch information
himdel committed Sep 6, 2017
2 parents 7d6de02 + 22d1029 commit 689bbfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/miq_policy_controller/alerts.rb
Expand Up @@ -664,7 +664,7 @@ def alert_get_info(alert)
end

if @alert.expression && !@alert.expression.kind_of?(MiqExpression) # Get the EMS if it's in the expression
@ems = ExtManagementSystem.find(@alert.expression[:options][:ems_id].to_i)
@ems = ExtManagementSystem.find_by(:id => @alert.expression[:options][:ems_id])
end
if @alert.expression.kind_of?(Hash) && @alert.expression[:eval_method]
MiqAlert.expression_options(@alert.expression[:eval_method]).each do |eo|
Expand Down

0 comments on commit 689bbfc

Please sign in to comment.