Remediate the 2026-09-03 feature-test findings
This commit is contained in:
@@ -4,6 +4,7 @@ from flask import Blueprint, request
|
||||
from flask_jwt_extended import jwt_required
|
||||
|
||||
from shopdb.api import (
|
||||
intarg,
|
||||
db,
|
||||
Application,
|
||||
success_response,
|
||||
@@ -16,7 +17,7 @@ from shopdb.api import (
|
||||
|
||||
from ..models import KnowledgeBase
|
||||
|
||||
from shopdb.api import require_permission, apply_import_timestamps
|
||||
from shopdb.api import require_permission, apply_import_timestamps, intarg
|
||||
|
||||
knowledgebase_bp = Blueprint('knowledgebase', __name__)
|
||||
|
||||
@@ -91,8 +92,8 @@ def list_articles():
|
||||
query = query.filter(_search_clause(search))
|
||||
|
||||
# Filter by topic/application
|
||||
if appid := request.args.get('appid'):
|
||||
query = query.filter(KnowledgeBase.appid == int(appid))
|
||||
if (appid := intarg('appid')) is not None:
|
||||
query = query.filter(KnowledgeBase.appid == appid)
|
||||
|
||||
# Exact-match natural-key lookups for idempotent import. linkurl is the
|
||||
# stable natural key; shortdescription (the title) is offered as a fallback.
|
||||
|
||||
Reference in New Issue
Block a user