Skip to content

Commit d79a6a9

Browse files
Fix bug where user is unable to update public domain due to general settings not getting reflected in input model (#40)
1 parent 3c9c42b commit d79a6a9

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

app/services/spec/input_mapper.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,26 +100,26 @@ func (s *Service) ToApplication(ctx context.Context, in *types.ApplicationInput,
100100
func (s *Service) ToGeneralSettings(in *types.ApplicationInput, application *types.Application, spec *types.ApplicationSpec) {
101101
var name, description, icon string
102102
//Name
103-
if in.Name != "" {
104-
name = in.Name
103+
if in.GeneralInput != nil && in.GeneralInput.Name != "" {
104+
name = in.GeneralInput.Name
105105
} else if application.Name != "" {
106106
name = application.Name
107107
} else {
108108
name = DetectName(spec)
109109
}
110110

111111
//Description
112-
if in.Description != "" {
113-
description = strings.TrimSpace(in.Description)
112+
if in.GeneralInput != nil && in.GeneralInput.Description != "" {
113+
description = strings.TrimSpace(in.GeneralInput.Description)
114114
} else if application.Description != "" {
115115
description = application.Description
116116
} else {
117117
description = spec.Description
118118
}
119119

120120
//Icon
121-
if in.Icon != "" {
122-
icon = in.Icon
121+
if in.GeneralInput != nil && in.GeneralInput.Icon != "" {
122+
icon = in.GeneralInput.Icon
123123
} else if application.Spec.Icon != "" {
124124
icon = application.Spec.Icon
125125
} else {

0 commit comments

Comments
 (0)