From 422fb1c14f7cb79ec95017a37f9b406255a7c167 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 19 Apr 2026 21:34:50 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20uncategorize=20quiz=20=E2=80=94=20omit=20?= =?UTF-8?q?category=5Fid=20param=20when=20null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously sent ?category_id= (empty string) which FastAPI rejects with 422 validation error when parsing as int. Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/pages/QuizzesPage.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/QuizzesPage.jsx b/frontend/src/pages/QuizzesPage.jsx index 13634ef..47d0cb6 100644 --- a/frontend/src/pages/QuizzesPage.jsx +++ b/frontend/src/pages/QuizzesPage.jsx @@ -229,7 +229,8 @@ function QuizCard({ quiz, isModerator, categories, onDelete, onCategoryChange }) const assignCategory = async (catId) => { try { - await api.patch(`/categories/quizzes/${quiz.id}`, null, { params: { category_id: catId ?? '' } }) + const params = catId == null ? {} : { category_id: catId } + await api.patch(`/categories/quizzes/${quiz.id}`, null, { params }) onCategoryChange(quiz.id, catId) } catch { } setShowCatMenu(false)