From 5660163da530fbdd2cce52f85ef96edc987aaa01 Mon Sep 17 00:00:00 2001 From: William Allen Date: Tue, 7 Jul 2026 09:45:02 -0400 Subject: [PATCH] Fix build group deletion Build group deletion currently fails if a build is assigned to two groups, including the default "Experimental" group. This PR resolves the issue switching from an insert to an upsert operation while moving builds out of the deleted group. --- app/cdash/app/Model/BuildGroup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/cdash/app/Model/BuildGroup.php b/app/cdash/app/Model/BuildGroup.php index 197b58a6a0..9ab4e28455 100644 --- a/app/cdash/app/Model/BuildGroup.php +++ b/app/cdash/app/Model/BuildGroup.php @@ -369,7 +369,7 @@ public function Delete(): bool ])->first(); } - $newGroup?->builds()->attach($oldbuild); + $newGroup?->builds()->syncWithoutDetaching($oldbuild); } // We delete the buildgroup