Preserve defaulted prompt input inspection metadata
This commit is contained in:
@@ -171,12 +171,11 @@ func (state *loaded) capturePromptInputs(id string, rawInputs []promptInputConfi
|
||||
inputs = append(inputs, domain.PromptInput{
|
||||
Name: input.Name, Required: input.Required, ContentType: contentType, Description: description,
|
||||
})
|
||||
presence := state.promptMetadata[id][index]
|
||||
item := prompt.InputMetadata{Name: input.Name, Required: input.Required}
|
||||
if presence.contentType == fieldValue {
|
||||
if input.ContentType != nil {
|
||||
item.ContentType = stringPointer(contentType)
|
||||
}
|
||||
if presence.description == fieldValue {
|
||||
if input.Description != nil {
|
||||
item.Description = stringPointer(description)
|
||||
}
|
||||
metadata = append(metadata, item)
|
||||
|
||||
Reference in New Issue
Block a user