From 37c213d91ca04485b74babcd0e9a78ae9403c973 Mon Sep 17 00:00:00 2001 From: Brad Hubbard-Nelson Date: Thu, 5 Oct 2023 14:20:28 -0400 Subject: [PATCH] for models which don't have a community --- src/task_queue/database_tasks/contents_spacing_correction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/task_queue/database_tasks/contents_spacing_correction.py b/src/task_queue/database_tasks/contents_spacing_correction.py index c794ef562..ac76c9e95 100644 --- a/src/task_queue/database_tasks/contents_spacing_correction.py +++ b/src/task_queue/database_tasks/contents_spacing_correction.py @@ -39,7 +39,7 @@ def get_community(instance): return instance.community.name if instance.community else "" elif instance and hasattr(instance, "primary_community"): return instance.primary_community.name if instance.primary_community else "" - + return "N/A" def get_model_instances(model_name, app_label): model = apps.get_model(app_label=app_label, model_name=model_name)