parameters: ()
return_statement: return False
docstring: Returns whether a new organization can be created in the current instance.
  
      Organizations can be created only in the following cases:
      - if on PostHog Cloud
      - if running end-to-end tests
      - if there's no organization yet
      - if an appropriate license is active and MULTI_ORG_ENABLED is True
docstring_summary: Returns whether a new organization can be created in the current instance.
docstring_tokens: Returns whether a new organization can be created in the current instance .
function: def get_can_create_org() -> bool:
      """Returns whether a new organization can be created in the current instance.
  
      Organizations can be created only in the following cases:
      - if on PostHog Cloud
      - if running end-to-end tests
      - if there's no organization yet
      - if an appropriate license is active and MULTI_ORG_ENABLED is True
      """
      from posthog.models.organization import Organization
  
      if (
          settings.MULTI_TENANCY
          or settings.DEMO
          or settings.E2E_TESTING
          or not Organization.objects.filter(for_internal_metrics=False).exists()
      ):
          return True
  
      if settings.MULTI_ORG_ENABLED:
          try:
              from ee.models.license import License
          except ImportError:
              pass
          else:
              license = License.objects.first_valid()
              if license is not None and AvailableFeature.ZAPIER in license.available_features:
                  return True
              else:
                  print_warning(["You have configured MULTI_ORG_ENABLED, but not the required premium PostHog plan!"])
  
      return False
function_tokens: def get_can_create_org ( ) -> bool : from posthog . models . organization import Organization if ( settings . MULTI_TENANCY or settings . DEMO or settings . E2E_TESTING or not Organization . objects . filter ( for_internal_metrics = False ) . exists ( ) ) : return True if settings . MULTI_ORG_ENABLED : try : from ee . models . license import License except ImportError : pass else : license = License . objects . first_valid ( ) if license is not None and AvailableFeature . ZAPIER in license . available_features : return True else : print_warning ( [ "You have configured MULTI_ORG_ENABLED, but not the required premium PostHog plan!" ] ) return False