Fix empty badge_id bug

1. the code was checking if an empty badge was already existing in the db => error if someone already had no badge_uid
2. after that, the sql structure asked unique badge_uid => same kind of error