From 9ccfe443a696b733da68e04ca961d7967838a910 Mon Sep 17 00:00:00 2001 From: "Dat. Ba Dao" Date: Mon, 20 Jan 2025 14:31:39 +0700 Subject: [PATCH] internal/controller: fix panic when getting repoURL in custom config (#259) --- internal/controller/atlasschema_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/controller/atlasschema_controller.go b/internal/controller/atlasschema_controller.go index 3b1c431..32b4c74 100644 --- a/internal/controller/atlasschema_controller.go +++ b/internal/controller/atlasschema_controller.go @@ -758,7 +758,7 @@ func (d *managedData) repoURL() *url.URL { Host: d.Cloud.Repo, }) // Fallback to desired URL if it's Cloud URL. - case d.Desired.Scheme == dbv1alpha1.SchemaTypeAtlas: + case d.Desired != nil && d.Desired.Scheme == dbv1alpha1.SchemaTypeAtlas: c := *d.Desired c.RawQuery = "" return &c