fix test issues
API CI/CD / Validate (composer + pint) (push) Successful in 3m30s
API CI/CD / Test (PHPUnit) (push) Failing after 5m4s
API CI/CD / Build frontend assets (push) Successful in 1m1s
API CI/CD / Security audit (push) Failing after 49s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
API CI/CD / Validate (composer + pint) (push) Successful in 3m30s
API CI/CD / Test (PHPUnit) (push) Failing after 5m4s
API CI/CD / Build frontend assets (push) Successful in 1m1s
API CI/CD / Security audit (push) Failing after 49s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
This commit is contained in:
@@ -44,7 +44,14 @@ class EnsureSchoolYearEditable
|
||||
{
|
||||
$years = [];
|
||||
|
||||
$years[] = $this->selectedSchoolYear->fromRequest($request)->name;
|
||||
try {
|
||||
$years[] = $this->selectedSchoolYear->fromRequest($request)->name;
|
||||
} catch (HttpExceptionInterface $e) {
|
||||
if ($e->getStatusCode() !== Response::HTTP_UNPROCESSABLE_ENTITY
|
||||
|| $e->getMessage() !== 'A school_year value is required.') {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
$currentSchoolYear = $request->input('current_school_year', $request->query('current_school_year'));
|
||||
if (is_string($currentSchoolYear) && trim($currentSchoolYear) !== '') {
|
||||
|
||||
Reference in New Issue
Block a user