Add PDBTagMixin.get_root_tags
This commit is contained in:
parent
d10fe47dc4
commit
ac2b820a30
1 changed files with 5 additions and 0 deletions
|
@ -889,6 +889,11 @@ class PDBTagMixin:
|
||||||
def get_tags(self):
|
def get_tags(self):
|
||||||
yield from self.get_things(thing_type='tag')
|
yield from self.get_things(thing_type='tag')
|
||||||
|
|
||||||
|
def get_root_tags(self):
|
||||||
|
for tag in self.get_tags():
|
||||||
|
if tag.parent() is None:
|
||||||
|
yield tag
|
||||||
|
|
||||||
@decorators.required_feature('enable_new_tag')
|
@decorators.required_feature('enable_new_tag')
|
||||||
@decorators.transaction
|
@decorators.transaction
|
||||||
def new_tag(self, tagname, description=None, *, commit=True):
|
def new_tag(self, tagname, description=None, *, commit=True):
|
||||||
|
|
Loading…
Reference in a new issue