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