fix: MediaWiki import - increase limit to 500 and add validation
Error: 422 Unprocessable Entity when limit > 100 Root cause: Backend enforced max=100, frontend allowed any value Backend fix: - Increased preview limit from 100 to 500 (consistent with execute) - import_wiki.py line 64: le=100 → le=500 Frontend fix: - Added Math.min/max validation to both limit inputs - Preview limit: max 500 with auto-clamp - Execute limit: max 500 with auto-clamp - Updated placeholder: 'Kein Limit (max 500)' Prevents 422 errors from invalid limit values
This commit is contained in:
1 parent
89055ddbc4
commit
c738f1234b
2 files changed
+9
-5
No files matched your search
@@ -61,7 +61,7 @@ def require_admin(session: dict = Depends(require_auth)) -> dict:
|
||||
async def preview_import(
|
||||
category: str = Query(default=CATEGORY_EXERCISES),
|
||||
import_type: str = Query(default="exercise"),
|
||||
limit: int = Query(default=10, ge=1, le=100),
|
||||
limit: int = Query(default=10, ge=1, le=500),
|
||||
session: dict = Depends(require_admin),
|
||||
):
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user