Skip to content

Commit

Permalink
Avoid saving disabled status when deleting a project (jenkinsci#8528)
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick authored Sep 29, 2023
1 parent 28239d9 commit 823ab34
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/src/main/java/hudson/model/AbstractProject.java
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,10 @@ public EnvVars getEnvironment(@CheckForNull Node node, @NonNull TaskListener lis
@Override
protected void performDelete() throws IOException, InterruptedException {
// prevent a new build while a delete operation is in progress
makeDisabled(true);
if (supportsMakeDisabled()) {
setDisabled(true);
Jenkins.get().getQueue().cancel(this);
}
FilePath ws = getWorkspace();
if (ws != null) {
Node on = getLastBuiltOn();
Expand Down

0 comments on commit 823ab34

Please sign in to comment.