'updates the _user_tag column in the table'

def update(self, dn, tl):

    if (not tl):
        tags = u''
    else:
        tl = list(set(filter((lambda x: x), tl)))
        tags = (u',' + u','.join(tl))
    try:
        frappe.db.sql((u'update    `tab%s`    set    _user_tags=%s    where    name=%s' % (self.dt, u'%s', u'%s')), (tags, dn))
    except Exception as e:
        if (e.args[0] == 1054):
            if (not tags):
                return
            self.setup()
            self.update(dn, tl)
        else:
            raise
