From e22501ae238c18cfc05990b351be0ec84c75c2f9 Mon Sep 17 00:00:00 2001 From: Ayush Shukla Date: Sat, 11 Apr 2026 22:05:00 +0530 Subject: [PATCH 1/2] fix: correct dict literal syntax in import_entries warning accumulation --- montage/admin_endpoints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/montage/admin_endpoints.py b/montage/admin_endpoints.py index a4f608d1..b86795f8 100644 --- a/montage/admin_endpoints.py +++ b/montage/admin_endpoints.py @@ -367,7 +367,7 @@ def import_entries(user_dao, round_id, request_dict): u'- {}'.format(warning) for warning in warnings ]) msg = u'unable to load {} files:\n{}'.format(len(warnings), formatted_warnings) - import_warnings.append({'import issues', msg}) + import_warnings.append({'import issues': msg}) params = {'file_names': file_names} else: raise NotImplementedResponse() From 4b8e31389a0d99126c8c1c79a54762383d8c6a16 Mon Sep 17 00:00:00 2001 From: Lodewijk <32471480+lgelauff@users.noreply.github.com> Date: Thu, 16 Apr 2026 12:57:33 +0200 Subject: [PATCH 2/2] fix: wrap csv/gistcsv import warning in dict for consistent frontend rendering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The csv/gistcsv branch was appending a plain string to import_warnings. The frontend processes warnings with Object.values(warning).pop(), which expects each entry to be an object — passing a string yields individual characters, so only the last character would be displayed. Wraps the message in {'import issues': msg} to match all other branches. --- montage/admin_endpoints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/montage/admin_endpoints.py b/montage/admin_endpoints.py index b86795f8..0dc28606 100644 --- a/montage/admin_endpoints.py +++ b/montage/admin_endpoints.py @@ -348,7 +348,7 @@ def import_entries(user_dao, round_id, request_dict): params = {'csv_url': csv_url} if warnings: msg = u'unable to load {} files ({!r})'.format(len(warnings), warnings) - import_warnings.append(msg) + import_warnings.append({'import issues': msg}) elif import_method == CATEGORY_METHOD: cat_name = request_dict['category'] entries = coord_dao.add_entries_from_cat(round_id, cat_name)