fix(filters): add explicit check for string slice filter
continuous-integration/drone/push Build is failing Details

Resolves https://github.com/go-vikunja/api/issues/109
This commit is contained in:
kolaente 2024-02-05 22:08:17 +01:00
parent 8914af194f
commit b95b92a23a
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 9 additions and 0 deletions

View File

@ -285,6 +285,15 @@ func convertFilterValues(value interface{}) string {
return strings.Join(filter, ",")
}
if stringSlice, is := value.([]string); is {
filter := []string{}
for _, v := range stringSlice {
filter = append(filter, convertFilterValues(v))
}
return strings.Join(filter, ",")
}
switch v := value.(type) {
case string:
return v