From 7bd4f268f61a5c6a79dca96ab938222e7f763787 Mon Sep 17 00:00:00 2001 From: EdgeNeko Date: Sun, 28 Apr 2024 23:52:50 +0800 Subject: [PATCH] strip categories while upload --- app/Models/api_models/admin_query_params.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/api_models/admin_query_params.py b/app/Models/api_models/admin_query_params.py index d4ab6ef..85c0073 100644 --- a/app/Models/api_models/admin_query_params.py +++ b/app/Models/api_models/admin_query_params.py @@ -17,7 +17,7 @@ def __init__(self, skip_ocr: bool = Query(False, description="Whether to skip the OCR process.")): self.url = url self.thumbnail_url = thumbnail_url - self.categories = categories.split(',') if categories else None + self.categories = [t.strip() for t in categories.split(',') if t.strip()] if categories else None self.starred = starred self.local = local self.skip_ocr = skip_ocr