from django.apps import AppConfig


class OrgsConfig(AppConfig):
    default_auto_field = "django.db.models.BigAutoField"
    name = "orgs"
    verbose_name = "Organizations & Tenancy"

    def ready(self) -> None:  # pragma: no cover
        # Import signal handlers robustly to avoid attribute import issues
        import importlib
        try:
            importlib.import_module("orgs.signals")
        except Exception:
            # Avoid startup hard-fail if migrations/apps not ready; re-raise only in debug if needed
            raise
        return super().ready()
