From 9cd4396dced7bfa0c47eeb95a35e47139583128d Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 28 Jan 2025 16:36:09 +0100 Subject: [PATCH] fix(theming): Do not throw in background color migration Signed-off-by: Ferdinand Thiessen --- .../lib/Migration/Version2006Date20240905111627.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/theming/lib/Migration/Version2006Date20240905111627.php b/apps/theming/lib/Migration/Version2006Date20240905111627.php index 92b3c0e4cfadf..6f9247aa2c54a 100644 --- a/apps/theming/lib/Migration/Version2006Date20240905111627.php +++ b/apps/theming/lib/Migration/Version2006Date20240905111627.php @@ -83,7 +83,12 @@ private function restoreUserColors(IOutput $output): void { ->set('configkey', $qb->createNamedParameter('primary_color')) ->where($qb->expr()->eq('appid', $qb->createNamedParameter(Application::APP_ID))) ->andWhere($qb->expr()->eq('configkey', $qb->createNamedParameter('background_color'))); - $qb->executeStatement(); - $output->info('Primary color of users restored'); + + try { + $qb->executeStatement(); + $output->info('Primary color of users restored'); + } catch (\Exception $exception) { + $output->warning('Cannot migrate background colors: Some users already configured the background color'); + } } }