This commit is contained in:
mr
2026-06-02 15:57:33 +02:00
parent c1490a7746
commit 322ea38bb4
+10 -6
View File
@@ -70,12 +70,16 @@ func (d *DynamicResource) SetAllowedInstances(request *tools.APIRequest, instanc
} }
break break
} }
sorted := make([]ResourceInstanceITF, len(d.Instances)) if d.SortRules != nil {
copy(sorted, d.Instances) sorted := make([]ResourceInstanceITF, len(d.Instances))
slices.SortStableFunc(sorted, func(a, b ResourceInstanceITF) int { copy(sorted, d.Instances)
d.SortRules["partnerships"] = "%v not contains 2" slices.SortStableFunc(sorted, func(a, b ResourceInstanceITF) int {
return d.compareByRules(a, b, d.SortRules) d.SortRules["partnerships"] = "%v not contains 2"
}) return d.compareByRules(a, b, d.SortRules)
})
d.Instances = sorted
}
d.WatchedDynamicResource = []string{} d.WatchedDynamicResource = []string{}
return d.Instances return d.Instances
} }