Skip to content

Commit 5bfb62b

Browse files
committed
fix copilot's suggestion
1 parent 109bf9f commit 5bfb62b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/controller/httproutepolicy.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ func (r *IngressReconciler) processHTTPRoutePolicies(tctx *provider.TranslateCon
122122
list v1alpha1.HTTPRoutePolicyList
123123
key = indexer.GenHTTPRoutePolicyIndexKey(networkingv1.GroupName, "Ingress", ingress.GetNamespace(), ingress.GetName(), "")
124124
)
125-
if err := r.List(ctx, &list, client.MatchingFields{indexer.PolicyTargetRefs: key}); err != nil {
125+
if err := r.List(context.Background(), &list, client.MatchingFields{indexer.PolicyTargetRefs: key}); err != nil {
126+
return err
126127
}
127128

128129
for _, item := range list.Items {

0 commit comments

Comments
 (0)