nil map
This commit is contained in:
@@ -70,12 +70,16 @@ func (d *DynamicResource) SetAllowedInstances(request *tools.APIRequest, instanc
|
||||
}
|
||||
break
|
||||
}
|
||||
sorted := make([]ResourceInstanceITF, len(d.Instances))
|
||||
copy(sorted, d.Instances)
|
||||
slices.SortStableFunc(sorted, func(a, b ResourceInstanceITF) int {
|
||||
d.SortRules["partnerships"] = "%v not contains 2"
|
||||
return d.compareByRules(a, b, d.SortRules)
|
||||
})
|
||||
if d.SortRules != nil {
|
||||
sorted := make([]ResourceInstanceITF, len(d.Instances))
|
||||
copy(sorted, d.Instances)
|
||||
slices.SortStableFunc(sorted, func(a, b ResourceInstanceITF) int {
|
||||
d.SortRules["partnerships"] = "%v not contains 2"
|
||||
return d.compareByRules(a, b, d.SortRules)
|
||||
})
|
||||
d.Instances = sorted
|
||||
}
|
||||
|
||||
d.WatchedDynamicResource = []string{}
|
||||
return d.Instances
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user