Skip to content

Commit

Permalink
Cleanup of old views
Browse files Browse the repository at this point in the history
  • Loading branch information
Joerg Flade committed Apr 28, 2020
1 parent 51ca36f commit 76e1a5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JenkinsJobDslRemote.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void cleanupEmptyViews() {
List<View> jenkinsViewList = jenkinsInstance.getViews()
if (jenkinsViewList != null && !jenkinsViewList.isEmpty()) {
for (View jenkinsView : jenkinsViewList) {
if (jenkinsView.getAllItems() == null) {
if (jenkinsView.getAllItems() == null || jenkinsView.getAllItems().isEmpty()) {
jenkinsInstance.deleteView(jenkinsView)
}
}
Expand Down

0 comments on commit 76e1a5e

Please sign in to comment.