ignore tags on delete

This commit is contained in:
Rushabh Mehta 2011-08-30 17:26:20 +05:30
parent e0404b40a5
commit f5bb7b572b

View file

@ -70,7 +70,7 @@ class DocTags:
def get_tags(self, dn):
"""returns tag for a particular item"""
return webnotes.conn.get_value(self.dt, dn, '_user_tags') or ''
return webnotes.conn.get_value(self.dt, dn, '_user_tags', ignore=1) or ''
def create(self, tag):
try:
@ -117,6 +117,10 @@ class DocTags:
(self.dt,'%s','%s'), (tags , dn))
except Exception, e:
if e.args[0]==1054:
if not tags:
# no tags, nothing to do
return
self.setup()
self.update(dn, tl)
else: raise e