def check_exists_in_object(method, obj, required_fields):
    """Checks if required fields have a value in the object instance.
    Throws an exception with the missing fields.

    :param object obj: Object to check.
    :param typle required_fields: Required fields that must have a value.
    """
    missing = []
    for field in required_fields:
        if getattr(obj, field) is None:
            missing.append(field)
    if missing:
        raise PyCronofyValidationError('Method: %s. Missing auth field(s): %s' % (method, missing),
                                       method,
                                       missing
                                       )
Checks if required fields have a value in the object instance.
    Throws an exception with the missing fields.

    :param object obj: Object to check.
    :param typle required_fields: Required fields that must have a value.