Fix get null object bug.

This commit is contained in:
Yang Luo
2021-06-21 01:01:16 +08:00
parent 54e97d57bf
commit 64f85fdc6c
7 changed files with 32 additions and 1 deletions

View File

@ -83,6 +83,10 @@ func extendApplicationWithOrg(application *Application) {
}
func getApplication(owner string, name string) *Application {
if owner == "" || name == "" {
return nil
}
application := Application{Owner: owner, Name: name}
existed, err := adapter.Engine.Get(&application)
if err != nil {