diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-11-07 14:26:14 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-11-07 14:26:14 +0100 |
commit | 3cb4614273bfc10a6d3acc98d7a450dbe9f1aaaf (patch) | |
tree | 033136423fd22ddde90748a13c5ebe040b576c85 /app/models/clusters/applications/ingress.rb | |
parent | f96b5eae20dbba3c2ce79556c4a9b034a590ee39 (diff) | |
download | gitlab-ce-3cb4614273bfc10a6d3acc98d7a450dbe9f1aaaf.tar.gz |
Fix initial status again
Diffstat (limited to 'app/models/clusters/applications/ingress.rb')
-rw-r--r-- | app/models/clusters/applications/ingress.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/app/models/clusters/applications/ingress.rb b/app/models/clusters/applications/ingress.rb index c97e9db925e..02c14a33e23 100644 --- a/app/models/clusters/applications/ingress.rb +++ b/app/models/clusters/applications/ingress.rb @@ -12,6 +12,8 @@ module Clusters default_value_for :ingress_type, :nginx default_value_for :version, :nginx + after_initialize :set_initial_status + enum ingress_type: { nginx: 1 } @@ -20,12 +22,8 @@ module Clusters self.to_s.demodulize.underscore end - def initial_status - if cluster&.application_helm_installed? - :installable - else - :not_installable - end + def set_initial_status + self.status = 'installable' if cluster&.application_helm_installed? end def name |