Skip to content
This repository was archived by the owner on Oct 5, 2021. It is now read-only.

disallow duplicates for tags on the front end #41

Open
dollschasingmen opened this issue Mar 20, 2017 · 0 comments
Open

disallow duplicates for tags on the front end #41

dollschasingmen opened this issue Mar 20, 2017 · 0 comments
Labels

Comments

@dollschasingmen
Copy link
Contributor

dollschasingmen commented Mar 20, 2017

So that we can avoid errors like this:

 PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_tags_on_name"
DETAIL: Key (name)=(marketing) already exists.

+ 79 non-project frames
80
File "/usr/local/bundle/gems/aleph_analytics-0.0.6/lib/interaction/query_update.rb" line 42 in execute
81
File "/usr/local/bundle/gems/aleph_analytics-0.0.6/app/controllers/queries_controller.rb" line 44 in block (2 levels) in update
+ 2 non-project frames
84
File "/usr/local/bundle/gems/aleph_analytics-0.0.6/app/controllers/queries_controller.rb" line 41 in update
+ 80 non-project frames
ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_tags_on_name"
DETAIL: Key (name)=(marketing) already exists.
: INSERT INTO "tags" ("name") VALUES ($1) RETURNING "id"
+ 79 non-project frames
80
File "/usr/local/bundle/gems/aleph_analytics-0.0.6/lib/interaction/query_update.rb" line 42 in execute
81
File "/usr/local/bundle/gems/aleph_analytics-0.0.6/app/controllers/queries_controller.rb" line 44 in block (2 levels) in update
+ 2 non-project frames
84
File "/usr/local/bundle/gems/aleph_analytics-0.0.6/app/controllers/queries_controller.rb" line 41 in update
+ 80 non-project frames
ActsAsTaggableOn::DuplicateTagError: 'marketing' has already been taken
- 32 non-project frames
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant