diff --git a/etiquette/photodb.py b/etiquette/photodb.py index 62595f5..9ee4dbf 100644 --- a/etiquette/photodb.py +++ b/etiquette/photodb.py @@ -819,7 +819,9 @@ class PDBTagMixin: def get_tag_by_name(self, tagname): if isinstance(tagname, objects.Tag): - tagname = tagname.name + if tagname.photodb == self: + return tagname + tagname = tagname.tagname tagname = tagname.strip('.+') tagname = tagname.split('.')[-1].split('+')[0]