From 256a52e9021385bce6d38f54dfaf181f17ff07ab Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Sat, 21 Sep 2024 15:07:05 -0700 Subject: [PATCH] Provide link back to source in fetch result --- intake/app.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/intake/app.py b/intake/app.py index a91c7a6..a37f961 100644 --- a/intake/app.py +++ b/intake/app.py @@ -16,7 +16,6 @@ from flask import ( redirect, url_for, current_app, - make_response, ) from intake.core import intake_data_dir @@ -397,11 +396,10 @@ def fetch(source_name: str): try: items = fetch_items(source) - titles = "\n".join(item.display_title for item in items) update_items(source, items) - response = make_response(f"Update returned {len(items)} items:\n{titles}", 200) - response.mimetype = "text/plain" - return response + titles = "\n".join(f"
  • {item.display_title}
  • " for item in items) + source_url = url_for("source_feed", name=source_name) + return f"Update returned {len(items)} items:

    {source_name}

    " except InvalidConfigException as ex: abort(500, f"Could not fetch {source_name}:\n{ex}") except SourceUpdateException as ex: