Skip to content

Commit

Permalink
Merge pull request #345 from yungifez/analysis-4w6DOe
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
yungifez authored Aug 4, 2023
2 parents 85ea1b7 + f295237 commit 93e3fba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Services/AcademicYear/AcademicYearService.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ public function setAcademicYear($academicYearId, $schoolId = null): bool
$school = $this->schoolService->getSchoolById($schoolId);
$school->academic_year_id = $academicYearId;
//set semester id to first semester or null
$school->semester_id = $academicYear->semesters?->first()->id ?? ($school->academicYear->semesters()->create([
'name' => 'First',
$school->semester_id = $academicYear->semesters?->first()->id ?? $school->academicYear->semesters()->create([
'name' => 'First',
'school_id' => auth()->user()->school_id,
]))->id;
])->id;

return $school->save();
}
Expand Down

0 comments on commit 93e3fba

Please sign in to comment.