Skip to content

Commit

Permalink
only try to delete study info in db when in need (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
hougangliu authored and k8s-ci-robot committed Jan 24, 2019
1 parent 8545970 commit a777721
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controller/studyjob/katib_api_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ func deleteStudy(instance *katibv1alpha1.StudyJob) error {
c := katibapi.NewManagerClient(conn)
ctx := context.Background()
studyID := instance.Status.StudyID
if studyID == "" {
// in case that information for a studyjob is not created in DB
return nil
}
deleteStudyreq := &katibapi.DeleteStudyRequest{
StudyId: studyID,
}
Expand Down

0 comments on commit a777721

Please sign in to comment.