Skip to content

Commit 2839324

Browse files
committed
Refactor workload retrieval in kafkaTopicAclResolver
1 parent 843afea commit 2839324

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

internal/graph/kafka.resolvers.go

+1-6
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,7 @@ func (r *kafkaTopicAclResolver) Workload(ctx context.Context, obj *kafkatopic.Ka
7272
return nil, nil
7373
}
7474

75-
owner := &workload.Reference{
76-
Type: workload.TypeApplication,
77-
Name: obj.WorkloadName,
78-
}
79-
80-
w, err := getWorkload(ctx, owner, slug.Slug(obj.TeamName), obj.EnvironmentName)
75+
w, err := tryWorkload(ctx, slug.Slug(obj.TeamName), obj.EnvironmentName, obj.WorkloadName)
8176
if errors.Is(err, &watcher.ErrorNotFound{}) {
8277
return nil, nil
8378
}

0 commit comments

Comments
 (0)