Skip to content

Commit 99b19c5

Browse files
authored
fix: delete git repo without pipeline config (#6148)
* fix: delete git repo without pipeline config * fix: git material delete without config
1 parent bb7396f commit 99b19c5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

pkg/pipeline/CiMaterialConfigService.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,18 @@ func (impl *CiMaterialConfigServiceImpl) DeleteMaterial(request *bean.UpdateMate
160160
materials = append(materials, materialDbObject[0])
161161
}
162162

163-
if len(materials) == 0 {
164-
return nil
163+
if len(materials) != 0 {
164+
err = impl.ciPipelineMaterialRepository.Update(tx, materials...)
165+
if err != nil {
166+
impl.logger.Errorw("error while updating ci pipeline material", "appId", request.AppId, "err", err)
167+
return err
168+
}
165169
}
166170

167-
err = impl.ciPipelineMaterialRepository.Update(tx, materials...)
171+
//err = impl.ciPipelineMaterialRepository.Update(tx, materials...)
168172
err = tx.Commit()
169173
if err != nil {
174+
impl.logger.Errorw("error in committing changes in ci pipeline material", "appId", request.AppId, "err", err)
170175
return err
171176
}
172177

0 commit comments

Comments
 (0)