You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing this exception a lot when trying to update the tags of an object o whose o.tags is non-empty (see below). I realised that in my version (0.3.3, from pip), nothing seems to define what name_any should be. Same when I git cloned the HEAD from here (github). I think this must be a bug is it?
In [129]: v.tags
Out[129]: []
In [130]: v.tags = '"tag 1", tag2'
In [132]: v.tags
Out[132]: [<Tag: tag 1>, <Tag: tag2>]
In [133]: v.tags = 'tag3'
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/virtualenvs/nhschoices/local/lib/python2.7/site-packages/django/core/management/commands/shell.pyc in <module>()
----> 1 v.tags = 'tag3'
/virtualenvs/nhschoices/local/lib/python2.7/site-packages/tagging/managers.pyc in __set__(self, instance, value)
63
64 def __set__(self, instance, value):
---> 65 Tag.objects.update_tags(instance, value)
66
67 def __delete__(self, instance):
/virtualenvs/nhschoices/local/lib/python2.7/site-packages/tagging/models.pyc in update_tags(self, obj, tag_names)
54 tag__in=tags_for_removal).delete()
55 # Add new tags
---> 56 current_tag_names = [tag.name_any for tag in current_tags]
57 for tag_name in updated_tag_names:
58 if tag_name not in current_tag_names:
AttributeError: 'Tag' object has no attribute 'name_any'
The text was updated successfully, but these errors were encountered:
Hi @jogwen nice to see someone who uses tagging-ng these days. I have no time to support this libarary anymore. If you wish, you could add a test for this bug and fix it. I'll accept a pull.
Hi @svetlyak40wt, thanks for responding. I'm looking at django_tagging_ng because it's installed in a project I'm working on. I see that django_tagging is being maintained a bit more than your version, so I might evaluate whether we can switch over (and whether switching would fix the issues I'm finding here). If not then I'll come back and fix here. Thanks.
I'm experiencing this exception a lot when trying to update the tags of an object
o
whoseo.tags
is non-empty (see below). I realised that in my version (0.3.3, from pip), nothing seems to define whatname_any
should be. Same when I git cloned the HEAD from here (github). I think this must be a bug is it?The text was updated successfully, but these errors were encountered: