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:
@@ -213,21 +213,7 @@ class ClassProgressQueryService
|
||||
|
||||
private function resolveSchoolYearFilter(array $filters): string
|
||||
{
|
||||
$schoolYear = trim((string) ($filters['school_year'] ?? ''));
|
||||
if ($schoolYear !== '') {
|
||||
return $schoolYear;
|
||||
}
|
||||
|
||||
$schoolYearId = (int) ($filters['school_year_id'] ?? 0);
|
||||
if ($schoolYearId <= 0 || ! Schema::hasTable('school_years')) {
|
||||
return '';
|
||||
}
|
||||
|
||||
try {
|
||||
return trim((string) DB::table('school_years')->where('id', $schoolYearId)->value('name'));
|
||||
} catch (\Throwable) {
|
||||
return '';
|
||||
}
|
||||
return trim((string) ($filters['school_year'] ?? ''));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user