mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 06:49:40 +02:00
fix(application): hpa breaks application edit (#4166)
This commit is contained in:
parent
2158cc5157
commit
e4ca58a042
1 changed files with 4 additions and 2 deletions
|
@ -276,8 +276,10 @@ class KubernetesApplicationService {
|
|||
|
||||
const newKind = KubernetesHorizontalPodAutoScalerHelper.getApplicationTypeString(newApp);
|
||||
const newAutoScaler = KubernetesHorizontalPodAutoScalerConverter.applicationFormValuesToModel(newFormValues, newKind);
|
||||
if (_.isEmpty(oldFormValues.AutoScaler)) {
|
||||
await this.KubernetesHorizontalPodAutoScalerService.create(newAutoScaler);
|
||||
if (!oldFormValues.AutoScaler.IsUsed) {
|
||||
if (newFormValues.AutoScaler.IsUsed) {
|
||||
await this.KubernetesHorizontalPodAutoScalerService.create(newAutoScaler);
|
||||
}
|
||||
} else {
|
||||
const oldKind = KubernetesHorizontalPodAutoScalerHelper.getApplicationTypeString(oldApp);
|
||||
const oldAutoScaler = KubernetesHorizontalPodAutoScalerConverter.applicationFormValuesToModel(oldFormValues, oldKind);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue