feat(seeders): associate categories with tenant codes in seeders and tests
This commit is contained in:
@@ -236,11 +236,11 @@ class ProductCatalogFromImagesSeeder extends Seeder
|
||||
|
||||
$category = Category::query()
|
||||
->where('nombre', $metadata['category_name'])
|
||||
->whereNull('tenant_code')
|
||||
->where('tenant_code', $tenant->codigo)
|
||||
->first();
|
||||
|
||||
if (! $category instanceof Category) {
|
||||
throw new RuntimeException("Category '{$metadata['category_name']}' not found.");
|
||||
throw new RuntimeException("Category '{$metadata['category_name']}' not found for tenant '{$tenant->codigo}'.");
|
||||
}
|
||||
|
||||
$attributeCodes = Attribute::query()
|
||||
|
||||
Reference in New Issue
Block a user