Skip to content

index_organizations#

Command#

Bases: BaseCommand

Source code in src/apps/actors/management/commands/index_organizations.py
class Command(BaseCommand):
    def add_arguments(self, parser: ArgumentParser):
        parser.add_argument(
            "--cached",
            "-c",
            action="store_true",
            required=False,
            default=False,
            help="Use cached organizations from organizations.csv.",
        )

    def handle(self, *args, **options):
        indexer = OrganizationIndexer()
        indexer.index(cached=options.get("cached"))