mirror of
https://github.com/nh-server/Kurisu.git
synced 2026-04-30 11:23:53 -07:00
It is supposed to be possible that one can have both a 3DS FC and a Switch FC. However, in the current code, both additions are trying to insert a new row into the table. What thus happened is that, in an event one has added a 3DS FC, and tries to add a Switch FC, or vice versa, a UniqueViolationError happens as we are trying to insert a new row for a user that already has a row. Fix this by checking whether a row already exists for this user, and update or insert depending on that. This resolves #1362.