Account for null asset in factory state

This commit is contained in:
Marcus Moore 2024-04-10 16:12:47 -07:00
parent b63962e90b
commit 6b6e18695f
No known key found for this signature in database

View file

@ -20,7 +20,7 @@ class LicenseSeatFactory extends Factory
{
return $this->state(function () use ($asset) {
return [
'asset_id' => $asset->id,
'asset_id' => $asset->id ?? Asset::factory(),
];
});
}