Fix audition factory to only create event if one is not provided.
This commit is contained in:
parent
42894c40c1
commit
b4bf94d9f8
|
|
@ -37,12 +37,10 @@ class AuditionFactory extends Factory
|
|||
'Percussion',
|
||||
];
|
||||
|
||||
$event = Event::factory()->create();
|
||||
|
||||
return [
|
||||
'event_id' => $event->id,
|
||||
#'name' => $this->faker->randomElement($instruments).$this->faker->numberBetween(1, 1000),
|
||||
'name' => 'New Instrument ' . $this->faker->unique()->words(4,true),
|
||||
'event_id' => Event::factory(),
|
||||
//'name' => $this->faker->randomElement($instruments).$this->faker->numberBetween(1, 1000),
|
||||
'name' => 'New Instrument '.$this->faker->unique()->words(4, true),
|
||||
'score_order' => $this->faker->numberBetween(2, 50),
|
||||
'entry_deadline' => Carbon::tomorrow(),
|
||||
'entry_fee' => 1000,
|
||||
|
|
@ -62,6 +60,7 @@ class AuditionFactory extends Factory
|
|||
fn (array $attributes) => ['entry_deadline' => $entryDeadline ?? Carbon::yesterday()]
|
||||
);
|
||||
}
|
||||
|
||||
public function seatingOnly(): self
|
||||
{
|
||||
return $this->state(
|
||||
|
|
|
|||
Loading…
Reference in New Issue