fix apply the plan docs/alrahma_api_fix_plan_school_year_only_v7
API CI/CD / Validate (composer + pint) (push) Successful in 3m10s
API CI/CD / Test (PHPUnit) (push) Failing after 6m49s
API CI/CD / Build frontend assets (push) Successful in 1m3s
API CI/CD / Security audit (push) Failing after 1m0s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
API CI/CD / Validate (composer + pint) (push) Successful in 3m10s
API CI/CD / Test (PHPUnit) (push) Failing after 6m49s
API CI/CD / Build frontend assets (push) Successful in 1m3s
API CI/CD / Security audit (push) Failing after 1m0s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
This commit is contained in:
@@ -30,7 +30,7 @@ class SchoolYearWriteGuard
|
||||
|
||||
foreach ($years as $year) {
|
||||
$row = $statuses->get($year);
|
||||
if ($row && $row->status !== SchoolYear::STATUS_ACTIVE) {
|
||||
if ($row && in_array($row->status, [SchoolYear::STATUS_CLOSED, SchoolYear::STATUS_ARCHIVED], true)) {
|
||||
throw new RuntimeException(sprintf(
|
||||
'School year %s is %s and read-only.',
|
||||
$year,
|
||||
|
||||
Reference in New Issue
Block a user