BurntNail / vent

Website for managing House Events
https://blog.maguire.tech/posts/projects/vent/
MIT License
4 stars 1 forks source link

Add an `ON CONFLICT` portion to adding people to events #80

Closed BurntNail closed 1 year ago

BurntNail commented 1 year ago

Describe the bug Currently, if people are added to events multiple times, it appears as a duplicate in the backend. Currently, it doesn't seem to affect the frontend, but I don't know how long that'll last.

To Reproduce

  1. Go to an event
  2. Add a prefect/participant to that event
  3. Add that same one again.

Expected behavior Only one entry in the database, instead there are two.

Additional context Add an ON CONFLICT DO NOTHING part to the SQL query here, and remove the people who are already added from the frontend.

BurntNail commented 1 year ago

not necessary as checked beforehand

BurntNail commented 1 year ago

and painful without indices which i cba