fixed import
This commit is contained in:
@@ -370,9 +370,14 @@ public function resolveOrCreateClientCaseForContract(Import $import, array $mapp
|
||||
|
||||
if (!$personId) {
|
||||
// Create minimal Person as last resort
|
||||
$personId = Person::create(['type_id' => 1])->id;
|
||||
$defaultGroupId = (int) (\App\Models\Person\PersonGroup::min('id') ?? 1);
|
||||
$personId = Person::create([
|
||||
'type_id' => 1,
|
||||
'group_id' => $defaultGroupId,
|
||||
])->id;
|
||||
Log::info('EntityResolutionService: Created minimal Person for new ClientCase', [
|
||||
'person_id' => $personId,
|
||||
'group_id' => $defaultGroupId,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user