fix(utils): handle null year in formatAcademicYear
All checks were successful
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 12s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 48s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 12s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 0s
All checks were successful
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 12s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 48s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 12s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 0s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -383,7 +383,8 @@ export function getPhaseStyle(phase?: string | null): { key: string; label: stri
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function formatAcademicYear(year: number): string {
|
export function formatAcademicYear(year: number | null | undefined): string {
|
||||||
|
if (year == null) return '';
|
||||||
const s = year.toString();
|
const s = year.toString();
|
||||||
if (s.length === 6) {
|
if (s.length === 6) {
|
||||||
return `${s.slice(0, 4)}/${s.slice(4)}`;
|
return `${s.slice(0, 4)}/${s.slice(4)}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user