From 46361725592608cbc56b58c477382f7be02453b4 Mon Sep 17 00:00:00 2001 From: Caleb Date: Fri, 25 Oct 2024 13:37:43 -0600 Subject: [PATCH 1/2] fix bulk_import command --- translations/bulk_import_translations.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/translations/bulk_import_translations.py b/translations/bulk_import_translations.py index d4834067..5cfa34b6 100644 --- a/translations/bulk_import_translations.py +++ b/translations/bulk_import_translations.py @@ -1,9 +1,16 @@ from translations.model_data import ModelDataController from .models import Translation -from programs.models import Program, Navigator, UrgentNeed, Document, WarningMessage, TranslationOverride +from programs.models import ( + Program, + Navigator, + ProgramCategory, + UrgentNeed, + Document, + WarningMessage, + TranslationOverride, +) from django.db import transaction from django.conf import settings -from django.core.exceptions import ObjectDoesNotExist from tqdm import trange from decouple import config @@ -15,6 +22,7 @@ "Document": Document, "WarningMessage": WarningMessage, "TranslationOverride": TranslationOverride, + "ProgramCategory": ProgramCategory, } TRANSLATED_MODELS = TRANSLATED_MODEL_MAP.values() From fda4302648ec10506973e4f920da3f1a51ba281e Mon Sep 17 00:00:00 2001 From: Caleb Date: Sat, 26 Oct 2024 11:21:00 -0600 Subject: [PATCH 2/2] change id to external_name --- screener/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screener/views.py b/screener/views.py index 958862a6..2ac1c345 100644 --- a/screener/views.py +++ b/screener/views.py @@ -405,7 +405,7 @@ def sort_first(program): caps.append({"programs": cap.programs, "cap": cap.cap}) category_map[category.id] = { - "id": category.external_name, + "external_name": category.external_name, "icon": category.icon, "name": default_message(category.name), "description": default_message(category.description),