Commit f96b5eae authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix initial_status

parent a906752d
...@@ -9,8 +9,6 @@ module Clusters ...@@ -9,8 +9,6 @@ module Clusters
validates :cluster, presence: true validates :cluster, presence: true
after_initialize :set_initial_status
default_value_for :ingress_type, :nginx default_value_for :ingress_type, :nginx
default_value_for :version, :nginx default_value_for :version, :nginx
...@@ -22,8 +20,12 @@ module Clusters ...@@ -22,8 +20,12 @@ module Clusters
self.to_s.demodulize.underscore self.to_s.demodulize.underscore
end end
def set_initial_status def initial_status
self.status = 0 unless cluster.application_helm_installed? if cluster&.application_helm_installed?
:installable
else
:not_installable
end
end end
def name def name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment