def update(pending_cert_id, **kwargs):
    """
    Updates a pending certificate.  The allowed fields are validated by
    PendingCertificateEditInputSchema.
    """
    pending_cert = get(pending_cert_id)
    for key, value in kwargs.items():
        setattr(pending_cert, key, value)

    log_service.audit_log("update_pending_certificate", pending_cert.name, f"Update summary - {kwargs}")
    return database.update(pending_cert)

    Updates a pending certificate.  The allowed fields are validated by
    PendingCertificateEditInputSchema.
    
lemur/pending_certificates/service.py