(change)
This is to ensure that the Couch document exists in the Couch database when the
    change is processed. We only care about the scenario where the document is missing.

    :raises: DocumentMissingError - Raised when the document is missing (never existed)
This is to ensure that the Couch document exists in the Couch database when the
    change is processed. We only care about the scenario where the document is missing.
This is to ensure that the Couch document exists in the Couch database when the change is processed . We only care about the scenario where the document is missing .
def ensure_document_exists(change):
    """
    This is to ensure that the Couch document exists in the Couch database when the
    change is processed. We only care about the scenario where the document is missing.

    :raises: DocumentMissingError - Raised when the document is missing (never existed)
    """
    change.get_document()
    if change.error_raised is not None and isinstance(change.error_raised, DocumentMissingError):
        raise change.error_raised
def ensure_document_exists ( change ) : change . get_document ( ) if change . error_raised is not None and isinstance ( change . error_raised , DocumentMissingError ) : raise change . error_raised