ignore defval on GetSlice

if there is an value the default gets not included in the slice of an value
This commit is contained in:
Christian Goll
2022-03-11 15:59:38 +01:00
parent 5094ff2f7d
commit 351b81b9e3
2 changed files with 2 additions and 2 deletions

View File

@@ -131,7 +131,7 @@ func (ent *Entry) GetSlice() []string {
if ent.altvalue != "" {
retval = util.SliceAppendUniq(retval, strings.Split(ent.altvalue, ","))
}
if ent.def != "" {
if ent.def != "" && len(retval) == 0 {
retval = util.SliceAppendUniq(retval, strings.Split(ent.def, ","))
}