def is_valid_context(self, context): customer = get_customer_from_context(context) return bool(context.get("page")) and bool(not customer.is_anonymous)
def is_valid_context(self, context): customer = get_customer_from_context(context) return (isinstance(customer, PersonContact) if customer else False)
def is_valid_context(self, context): customer = get_customer_from_context(context) return bool(customer.is_anonymous)
def is_valid_context(self, context): customer = get_customer_from_context(context) return isinstance(customer, CompanyContact) if customer else False
def is_valid_context(self, context): customer = get_customer_from_context(context) return bool(not customer.is_anonymous)