mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-28 11:37:42 +01:00
Set null list when or list is nil in query (#14941)
Set null list when or list is nil in query Signed-off-by: Wenkai Yin <yinw@vmware.com>
This commit is contained in:
parent
306e519dbe
commit
544fa806fa
@ -156,7 +156,9 @@ func setFilters(ctx context.Context, qs orm.QuerySeter, query *q.Query, meta *me
|
||||
}
|
||||
// or list
|
||||
if ol, ok := value.(*q.OrList); ok {
|
||||
if len(ol.Values) > 0 {
|
||||
if ol == nil || len(ol.Values) == 0 {
|
||||
qs = qs.Filter(key+"__in", nil)
|
||||
} else {
|
||||
qs = qs.Filter(key+"__in", ol.Values...)
|
||||
}
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user