Skip to content

Commit

Permalink
feat: Document.remove_tag (#22970) (#26178)
Browse files Browse the repository at this point in the history
Added remove_tag API for consistency

(cherry picked from commit 8e7cd47)

Co-authored-by: gavin <gavin18d@gmail.com>
  • Loading branch information
mergify[bot] and gavindsouza committed Apr 29, 2024
1 parent a41e496 commit 17ca7f4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frappe/model/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -1617,6 +1617,12 @@ def add_tag(self, tag):

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
Expand Down

0 comments on commit 17ca7f4

Please sign in to comment.