Fix comp alleg

This commit is contained in:
Jérémy Munsch 2023-08-16 12:30:43 +02:00
parent 634dbe832e
commit d9c132ad25
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC

View file

@ -303,7 +303,10 @@ return new class extends Migration
$claim = null;
if ($row->COMP_ALLEG) {
try {
$claim = $resolveAllegation($row->COMP_ALLEG);
if (!$resolveAllegation($row->COMP_ALLEG)->equals(ClaimEnum::others)) {
throw new \Error("`{$row->COMP_ALLEG}` is not resolved as `other`");
}
$claim = $row->COMP_ALLEG;
} catch (\Exception) {
throw new \Error("`{$row->COMP_ALLEG}` not found");
}