Skip to content

Commit 2afdd40

Browse files
chore: panic fix installed app read service (#6185)
* panic fix * sql script number change
1 parent a08cc6b commit 2afdd40

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

pkg/appStore/installedApp/read/adapter/adapter.go

+17-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func GetInstalledAppInternal(installedAppModel *repository.InstalledApps) *bean.
1212
if installedAppModel == nil {
1313
return nil
1414
}
15-
installedAppInternal := &bean.InstalledAppWithEnvAndClusterDetails{}
15+
installedAppInternal := GetNewInstalledAppWithEnvAndClusterDetails()
1616
installedAppInternal.InstalledAppMin = GetInstalledAppMin(installedAppModel)
1717
// Extra App details
1818
if !installedAppModel.App.IsEmpty() {
@@ -108,3 +108,19 @@ func GetInstalledAppVersionWithAppStoreDetails(installedAppVersionModel *reposit
108108
}
109109
return versionDetails
110110
}
111+
112+
func GetNewInstalledAppWithEnvAndClusterDetails() *bean.InstalledAppWithEnvAndClusterDetails {
113+
return &bean.InstalledAppWithEnvAndClusterDetails{
114+
InstalledAppWithEnvDetails: GetNewInstalledAppWithEnvDetails(),
115+
}
116+
}
117+
118+
func GetNewInstalledAppWithEnvDetails() *bean.InstalledAppWithEnvDetails {
119+
return &bean.InstalledAppWithEnvDetails{
120+
InstalledAppWithAppDetails: GetNewInstalledAppWithAppDetails(),
121+
}
122+
}
123+
124+
func GetNewInstalledAppWithAppDetails() *bean.InstalledAppWithAppDetails {
125+
return &bean.InstalledAppWithAppDetails{}
126+
}

0 commit comments

Comments
 (0)