Fix Academy page crash: optional chaining for byStatus and categoryInfo fallback

- statistics.byStatus.in_progress could crash on empty object → optional chaining
- COURSE_CATEGORY_INFO[course.category] could return undefined → fallback to 'custom'
- Update LLM model to qwen3.5:35b-a3b in docker-compose.yml

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-02-26 14:49:02 +01:00
parent 759c725793
commit c78a7b687e
2 changed files with 5 additions and 5 deletions

View File

@@ -125,7 +125,7 @@ function StatCard({
}
function CourseCard({ course, enrollmentCount }: { course: Course; enrollmentCount: number }) {
const categoryInfo = COURSE_CATEGORY_INFO[course.category]
const categoryInfo = COURSE_CATEGORY_INFO[course.category] || COURSE_CATEGORY_INFO['custom']
return (
<Link href={`/sdk/academy/${course.id}`}>
@@ -589,7 +589,7 @@ export default function AcademyPage() {
/>
<StatCard
label="Aktive Teilnehmer"
value={statistics.byStatus.in_progress + statistics.byStatus.not_started}
value={(statistics.byStatus?.in_progress || 0) + (statistics.byStatus?.not_started || 0)}
color="blue"
/>
<StatCard