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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Tudor Sitaru
2026-04-01 16:07:28 +01:00
parent 4db36b9099
commit d591d8e66b

View File

@@ -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();
if (s.length === 6) {
return `${s.slice(0, 4)}/${s.slice(4)}`;