Skip to content

Commit

Permalink
Guard against hitting const_missing from within const_missing
Browse files Browse the repository at this point in the history
If MiqAeServiceModelBase is not yet defined, we could hit const_missing
recursively, leading to a stack level too deep.

Fixes ManageIQ/manageiq#19618
  • Loading branch information
jrafanie committed Feb 3, 2020
1 parent c16b980 commit 3f4ea2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/miq_automation_engine/engine/miq_ae_method_service.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module MiqAeMethodService
def self.const_missing(name)
super unless defined?(MiqAeServiceModelBase)

MiqAeServiceModelBase.create_service_model_from_name(name) || super
end
end
Expand Down

0 comments on commit 3f4ea2c

Please sign in to comment.