(runtime model.Runtime)
| 1131 | } |
| 1132 | |
| 1133 | func handleRuntimeDetailID(runtime model.Runtime) (uint, uint) { |
| 1134 | app, _ := appRepo.GetFirst(appRepo.WithKey(runtime.Type)) |
| 1135 | if app.ID == 0 { |
| 1136 | return 0, 0 |
| 1137 | } |
| 1138 | appDetail, _ := appDetailRepo.GetFirst(appDetailRepo.WithVersion(runtime.Version), appDetailRepo.WithAppId(app.ID)) |
| 1139 | if appDetail.ID == 0 { |
| 1140 | return 0, 0 |
| 1141 | } |
| 1142 | runtime.AppDetailID = appDetail.ID |
| 1143 | _ = runtimeRepo.Save(&runtime) |
| 1144 | return app.ID, appDetail.ID |
| 1145 | } |