(report)
checks if this meets the preconditions for being allowed in the cache
checks if this meets the preconditions for being allowed in the cache
checks if this meets the preconditions for being allowed in the cache
def _is_valid(report):
    """
    checks if this meets the preconditions for being allowed in the cache
    """
    try:
        return (
            report.request.domain
            and report.request.couch_user._id
            and report.request.get_full_path().startswith(
                '/a/{domain}/'.format(domain=report.request.domain)
            )
        )
    except AttributeError:
        return False
def _is_valid ( report ) : try : return ( report . request . domain and report . request . couch_user . _id and report . request . get_full_path ( ) . startswith ( '/a/{domain}/' . format ( domain = report . request . domain ) ) ) except AttributeError : return False