'Onaccept routine for case event types:
- only one type can be the default
@param form: the FORM'

@staticmethod
def case_event_type_onaccept(form):

    form_vars = form.vars
    try:
        record_id = form_vars.id
    except AttributeError:
        record_id = None
    if (not record_id):
        return
    if (('is_default' in form_vars) and form_vars.is_default):
        table = current.s3db.dvr_case_event_type
        db = current.db
        db((table.id != record_id)).update(is_default=False)
