fix(tags): invalid 'copyright' kind 500 — KINDS uses real enum 'fandom'; directory 400s on bad kind

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-16 15:51:27 -04:00
parent 98c9fb9402
commit 93b6fc21c8
3 changed files with 25 additions and 1 deletions
+2
View File
@@ -56,6 +56,8 @@ async def autocomplete():
@tags_bp.route("/tags/directory", methods=["GET"])
async def directory():
kind = request.args.get("kind") or None
if kind is not None and _coerce_kind(kind) is None:
return jsonify({"error": f"invalid kind {kind!r}"}), 400
q = request.args.get("q") or None
cursor = request.args.get("cursor") or None
try: