Phalcode / gamevault-backend

Backend for the self-hosted gaming platform for drm-free games
https://gamevau.lt
Other
161 stars 13 forks source link

Can't create 2 users with blank email #242

Closed JoaGamo closed 8 months ago

JoaGamo commented 8 months ago

Describe the bug emails are not required by default, but the database refuses to store another user with () email (blank). Error is specifically

root-gamevault-backend-1  | error:   ┃ [ 1] [Unhandled QueryFailedError occurred: duplicate key value violates unique constraint "UQ_d0e7d50057240e5752a2c303ffb"]
root-gamevault-backend-1  | error:   ┃ [ 2] {
root-gamevault-backend-1  | error:   ┃ [ 3]   context: 'LoggingExceptionFilter',
root-gamevault-backend-1  | error:   ┃ [ 4]   error: QueryFailedError: duplicate key value violates unique constraint "UQ_d0e7d50057240e5752a2c303ffb"
root-gamevault-backend-1  | error:   ┃ [19]     detail: 'Key (email)=() already exists.',

To Reproduce Steps to reproduce the behavior:

  1. Create one user with blank email
  2. Create another user, different name/password, blank email
  3. See error

Expected behavior Blank email for both users

Alfagun74 commented 8 months ago

awesome catch. just fixed it. Thank you so much for reporting!