From fcbbe9b43270ca8d4dbd70879bd477edd5694091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Mon, 29 Mar 2021 14:44:08 +0200 Subject: [PATCH] fix departaimant migration --- .../migrations/2021_03_21_225444_migrate_departaimants.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/database/migrations/2021_03_21_225444_migrate_departaimants.php b/database/migrations/2021_03_21_225444_migrate_departaimants.php index 62d201bb..de944c74 100644 --- a/database/migrations/2021_03_21_225444_migrate_departaimants.php +++ b/database/migrations/2021_03_21_225444_migrate_departaimants.php @@ -97,7 +97,11 @@ class MigrateDepartaimants extends LeGaulois2016Migration $depValue = $oldDpCache[$dept->dId]->dept_code; $depValue = ($depValue == '971' || $depValue == '972') ? DepartaimantVintage::guadeloupeMartinique()->value : $depValue; - $departaimant = DepartaimantVintage::make($depValue); + try { + $departaimant = DepartaimantVintage::make($depValue); + } catch (BadMethodCallException $e) { + dump(sprintf('Unkonwn value %s for collection vintage', $depValue)); + } break; default: throw new Exception(sprintf(