def update_model(self, form, model):
    '\n            Update model helper\n\n            :param form:\n                Form instance\n            :param model:\n                Model instance to update\n        '
    try:
        form.populate_obj(model)
        self._on_model_change(form, model, False)
        model.save()
    except Exception as ex:
        if (not self.handle_view_exception(ex)):
            flash(gettext('Failed to update record. %(error)s', error=format_error(ex)), 'error')
            log.exception('Failed to update record.')
        return False
    else:
        self.after_model_change(form, model, False)
    return True
Update model helper

:param form:
    Form instance
:param model:
    Model instance to update
def update_model(self, form, model):
    '\n            Update model helper\n\n            :param form:\n                Form instance\n            :param model:\n                Model instance to update\n        '
    try:
        form.populate_obj(model)
        self._on_model_change(form, model, False)
        model.save()
    except Exception as ex:
        if (not self.handle_view_exception(ex)):
            flash(gettext('Failed to update record. %(error)s', error=format_error(ex)), 'error')
            log.exception('Failed to update record.')
        return False
    else:
        self.after_model_change(form, model, False)
    return True