diff --git a/app/models/mixins/per_ems_type_worker_mixin.rb b/app/models/mixins/per_ems_type_worker_mixin.rb index 46e5333a146..882d0a94796 100644 --- a/app/models/mixins/per_ems_type_worker_mixin.rb +++ b/app/models/mixins/per_ems_type_worker_mixin.rb @@ -3,13 +3,15 @@ module PerEmsTypeWorkerMixin included do self.check_for_minimal_role = false - @workers = lambda do - return 0 unless self.any_valid_ems_in_zone? - workers_configured_count - end end module ClassMethods + def workers + return 0 unless any_valid_ems_in_zone? + + super + end + def ems_class parent end