From 8e7cd47d3d66d983f7d24408c855aa4187b70b5b Mon Sep 17 00:00:00 2001 From: gavin Date: Mon, 30 Oct 2023 11:40:20 +0100 Subject: [PATCH] feat: Document.remove_tag (#22970) Added remove_tag API for consistency --- frappe/model/document.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frappe/model/document.py b/frappe/model/document.py index 1b7a97cc97..4d5eec64fc 100644 --- a/frappe/model/document.py +++ b/frappe/model/document.py @@ -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