Add comment

This commit is contained in:
zandercymatics 2025-03-24 09:24:52 -06:00
parent 36880bc514
commit ce22ddd62c
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -336,6 +336,10 @@ class Command(BaseCommand):
)
# First: get all existing suborgs
# NOTE: .all() is a heavy query, but unavoidable as we need to check for duplicate names.
# This is not quite as heavy as just using a for loop and .get_or_create, but worth noting.
# Change this if you can find a way to avoid doing this.
# This won't scale great for 10k+ records.
existing_suborgs = Suborganization.objects.all()
suborg_dict = {normalize_string(org.name): org for org in existing_suborgs}