Fix enums in generated admin schema code.
This commit is contained in:
parent
3ffdea90c3
commit
be5c1f9197
5 changed files with 36 additions and 10 deletions
|
|
@ -19,7 +19,7 @@
|
|||
Optional bool
|
||||
Immutable bool
|
||||
Sensitive bool
|
||||
Enums []Enum
|
||||
Enums []string
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -35,12 +35,9 @@
|
|||
Immutable: {{ $f.Immutable }},
|
||||
Sensitive: {{ $f.Sensitive }},
|
||||
{{- if len $f.Enums }}
|
||||
Enums: []Enum{
|
||||
Enums: []string{
|
||||
{{- range $e := $f.Enums }}
|
||||
{
|
||||
Label: "{{ $e.Label }}",
|
||||
Value: "{{ $e.Value }}",
|
||||
},
|
||||
"{{ $e.Value }}",
|
||||
{{- end }}
|
||||
},
|
||||
{{- else }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue