feat: Document.remove_tag (#22970)

Added remove_tag API for consistency
This commit is contained in:
gavin 2023-10-30 11:40:20 +01:00 committed by GitHub
parent fb5ca37cac
commit 8e7cd47d3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1584,6 +1584,12 @@ class Document(BaseDocument):
DocTags(self.doctype).add(self.name, tag)
def remove_tag(self, tag):
"""Remove a Tag to this document"""
from frappe.desk.doctype.tag.tag import DocTags
DocTags(self.doctype).remove(self.name, tag)
def get_tags(self):
"""Return a list of Tags attached to this document"""
from frappe.desk.doctype.tag.tag import DocTags