(cls, domain)
Returns SoftwarePlanVersion for the given domain.
Returns SoftwarePlanVersion for the given domain.
Returns SoftwarePlanVersion for the given domain .
def get_subscribed_plan_by_domain(cls, domain):
        """
        Returns SoftwarePlanVersion for the given domain.
        """
        domain_obj = ensure_domain_instance(domain)
        if domain_obj is None:
            try:
                return DefaultProductPlan.get_default_plan_version()
            except DefaultProductPlan.DoesNotExist:
                raise ProductPlanNotFoundError
        else:
            active_subscription = cls.get_active_subscription_by_domain(domain_obj.name)
            if active_subscription is not None:
                return active_subscription.plan_version
            else:
                return DefaultProductPlan.get_default_plan_version()
def get_subscribed_plan_by_domain ( cls , domain ) : domain_obj = ensure_domain_instance ( domain ) if domain_obj is None : try : return DefaultProductPlan . get_default_plan_version ( ) except DefaultProductPlan . DoesNotExist : raise ProductPlanNotFoundError else : active_subscription = cls . get_active_subscription_by_domain ( domain_obj . name ) if active_subscription is not None : return active_subscription . plan_version else : return DefaultProductPlan . get_default_plan_version ( )