Skip to content

Commit 758f179

Browse files
committed
nil handling
1 parent 970d0d1 commit 758f179

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/app/AppListingService.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,10 +794,15 @@ func (impl AppListingServiceImpl) setIpAccessProvidedData(ctx context.Context, a
794794
impl.Logger.Errorw("error in fetching docker registry id", "ciPipelineId", ciPipelineId, "error", err)
795795
return bean.AppDetailContainer{}, err
796796
}
797-
appDetailContainer.DockerRegistryId = *dockerRegistryId
798797
if !ciPipeline.IsExternal || ciPipeline.ParentCiPipeline != 0 {
799798
appDetailContainer.IsExternalCi = false
800799
}
800+
if dockerRegistryId == nil {
801+
impl.Logger.Errorw("docker registry id not found", "ciPipelineId", ciPipelineId)
802+
return appDetailContainer, nil
803+
}
804+
appDetailContainer.DockerRegistryId = *dockerRegistryId
805+
801806
_, span = otel.Tracer("orchestrator").Start(ctx, "dockerRegistryIpsConfigService.IsImagePullSecretAccessProvided")
802807
// check ips access provided to this docker registry for that cluster
803808
ipsAccessProvided, err := impl.dockerRegistryIpsConfigService.IsImagePullSecretAccessProvided(*dockerRegistryId, clusterId, isVirtualEnv)

0 commit comments

Comments
 (0)