Skip to content

Commit

Permalink
for models which don't have a community
Browse files Browse the repository at this point in the history
  • Loading branch information
BradHN1 committed Oct 5, 2023
1 parent 2fea32a commit 37c213d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 37c213d

Please sign in to comment.