def update_alert(self, alert_id, alert, fields=[]):
        """
        Update an alert.
        :param alert_id: The ID of the alert to update.
        :param data: The alert to update.
        :param fields: Optional parameter, an array of fields names, the ones we want to update
        :return:
        """
        req = self.url + "/api/alert/{}".format(alert_id)

        # update only the alert attributes that are not read-only
        update_keys = ['tlp', 'severity', 'tags', 'caseTemplate', 'title', 'description']

        data = {k: v for k, v in alert.__dict__.items() if
                (len(fields) > 0 and k in fields) or (len(fields) == 0 and k in update_keys)}

        if hasattr(alert, 'artifacts'):
            data['artifacts'] = [a.__dict__ for a in alert.artifacts]
        try:
            return requests.patch(req, headers={'Content-Type': 'application/json'}, json=data, proxies=self.proxies, auth=self.auth, verify=self.cert)
        except requests.exceptions.RequestException:
            raise AlertException("Alert update error: {}".format(e))
Update an alert.
        :param alert_id: The ID of the alert to update.
        :param data: The alert to update.
        :param fields: Optional parameter, an array of fields names, the ones we want to update
        :return: