From bd9c52dbd0f4d5bc933aa571f2edf8721de7a451 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Wed, 5 May 2021 14:03:51 -0700 Subject: [PATCH] Project: delete the `.jobsets` jobset if project is no longer declarative "No longer declarative" as defined by the "Edit project" page is an empty spec file. --- src/lib/Hydra/Controller/Project.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/Hydra/Controller/Project.pm b/src/lib/Hydra/Controller/Project.pm index e6a2dba8..20b3bd3b 100644 --- a/src/lib/Hydra/Controller/Project.pm +++ b/src/lib/Hydra/Controller/Project.pm @@ -169,6 +169,8 @@ sub updateProject { , emailoverride => "" , triggertime => time }); + } else { + $project->jobsets->search({ name => ".jobsets" })->delete; } }