From 4bdde1248eb252f7e5d4fb6ec20eb115c2fd4ac7 Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Mon, 15 Jun 2026 23:52:39 -0700 Subject: [PATCH] #874 fixup: import get_wishlist_service in the ignore-list endpoints ruff F821 caught a real NameError: the three /api/wishlist/ignore-list* endpoints called get_wishlist_service() without the local import every other call site in web_server.py uses, so they'd crash the moment the Ignored modal queried them. Add the import; ruff check now clean. --- web_server.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web_server.py b/web_server.py index a873ac7b..449e9405 100644 --- a/web_server.py +++ b/web_server.py @@ -16823,6 +16823,7 @@ def remove_batch_from_wishlist(): def get_wishlist_ignore_list(): """#874: active (non-expired) wishlist ignore entries for this profile.""" try: + from core.wishlist_service import get_wishlist_service runtime = _build_wishlist_route_runtime() entries = get_wishlist_service().database.get_wishlist_ignore(profile_id=runtime.profile_id) from core.wishlist.ignore import IGNORE_TTL_DAYS @@ -16839,6 +16840,7 @@ def remove_from_wishlist_ignore_list(): track_id = data.get('track_id') or data.get('spotify_track_id') if not track_id: return jsonify({"success": False, "error": "No track_id provided"}), 400 + from core.wishlist_service import get_wishlist_service runtime = _build_wishlist_route_runtime() ok = get_wishlist_service().database.remove_from_wishlist_ignore( track_id, profile_id=runtime.profile_id) @@ -16851,6 +16853,7 @@ def remove_from_wishlist_ignore_list(): def clear_wishlist_ignore_list(): """#874: clear the entire wishlist ignore-list for this profile.""" try: + from core.wishlist_service import get_wishlist_service runtime = _build_wishlist_route_runtime() count = get_wishlist_service().database.clear_wishlist_ignore(profile_id=runtime.profile_id) return jsonify({"success": True, "cleared": count})