Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate Tag error #1055

Open
rctneil opened this issue Oct 24, 2021 · 1 comment
Open

Duplicate Tag error #1055

rctneil opened this issue Oct 24, 2021 · 1 comment

Comments

@rctneil
Copy link

rctneil commented Oct 24, 2021

Hi,

I'm importing some data into my app that should add tags to some imported items.

I'm getting some ActsAsTaggableOn::DuplicateTagErrors, with messages like "'Tag here' has already been taken" .

Any ideas why this may be?

Surely that tag would just be assigned to the new item and not try to be created, which is what it looks like it's doing?

My code for adding the tags is as follows:

            # Add tags for Park name and Park name with Location 1
            park.tag_list.add(park.name) # Normal tag
            park.tag_list.add(park.name + ' ' + park.location_1) # Allows finding by tag if more than one park with same name
            park.tag_list.add('pl-' + park.name + ' ' + park.location_1)
            park.save
@rctneil
Copy link
Author

rctneil commented Oct 25, 2021

@mbleigh Looks like this may be related to #672

Is there any chance of a fix to this? It is seriously preventing me from the continuation of my app etc.

Many thanks in advance!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant