StartupInstituteWebDevCurriculum / tweeter

This is a somewhat broken twitter implementation that could use some work
0 stars 17 forks source link

Cannot create duplicate hashtag #6

Open andycarlson13 opened 6 years ago

andycarlson13 commented 6 years ago

PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_hashtags_on_tag" DETAIL: Key (tag)=(#hi) already exists. : INSERT INTO "hashtags" ("tag", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"

margarytat commented 6 years ago

The code tries to create a hashtag every time you use one

margarytat commented 6 years ago

I already fixed this