From b43a0569b1f5cd3b3e0ba72f73ea06f7dde486f4 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Sat, 11 Dec 2021 17:26:41 -0600 Subject: [PATCH] Fixes trying to get property 'id' of non-object in develop seeders --- database/factories/AssetFactory.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/database/factories/AssetFactory.php b/database/factories/AssetFactory.php index cdc5e29d96..2533154d11 100644 --- a/database/factories/AssetFactory.php +++ b/database/factories/AssetFactory.php @@ -8,7 +8,6 @@ use App\Models\Category; use App\Models\Location; use App\Models\Supplier; use Illuminate\Database\Eloquent\Factories\Factory; -use App\Models\StatusLabel; /* |-------------------------------------------------------------------------- @@ -41,7 +40,7 @@ class AssetFactory extends Factory 'name' => null, 'rtd_location_id' => Location::factory()->create(), 'serial' => $this->faker->uuid, - 'status_id' => StatusLabel::factory()->create()->id, + 'status_id' => 1, 'user_id' => 1, 'asset_tag' => $this->faker->unixTime('now'), 'notes' => 'Created by DB seeder',