From b90a9be1ae3331a4ea524532a9fbc81d4841b361 Mon Sep 17 00:00:00 2001 From: Oleh Fedorenko Date: Wed, 9 Oct 2024 15:23:47 +0000 Subject: [PATCH] Refs #37825 - Stop breaking Rails --- app/models/concerns/foreman/sti.rb | 8 -------- 1 file changed, 8 deletions(-) diff --git a/app/models/concerns/foreman/sti.rb b/app/models/concerns/foreman/sti.rb index 94560866813..1d48be990f3 100644 --- a/app/models/concerns/foreman/sti.rb +++ b/app/models/concerns/foreman/sti.rb @@ -15,13 +15,5 @@ def new(attributes = nil, &block) super end end - - def save(*args, **kwargs) - type_changed = type_changed? - self.class.instance_variable_set("@finder_needs_type_condition", :false) if type_changed - super - ensure - self.class.instance_variable_set("@finder_needs_type_condition", :true) if type_changed - end end end