def prep(r):
    if r.interactive:
        if r.component:
            tablename = r.component.tablename
            list_fields = s3db.get_config(tablename, 'list_fields')
            try:
                list_fields.remove('group_id')
            except:
                pass
            s3db.configure(tablename, deletable=s3_has_role('DelphiAdmin'), list_fields=list_fields)
    return True
def prep(r):
    if r.interactive:
        if r.component:
            tablename = r.component.tablename
            list_fields = s3db.get_config(tablename, 'list_fields')
            try:
                list_fields.remove('group_id')
            except:
                pass
            s3db.configure(tablename, deletable=s3_has_role('DelphiAdmin'), list_fields=list_fields)
    return True