So I’m having a hard time figuring out how do I check if the user’s input had already been used by sommeone in the database. My goal here is to make this input (IMEI) to be unique for every account (one phone per account) policy to avoid a person creating multiple accounts.
imports
Thanks for answering!!
As far as I know, werkzeug uses salting which means I can’t just generate the user’s input into a hashed value and compare it in the database because it will have a different hash value regardless if they have the same IMEI number. If i will use check_password_hash now, it gives me an error saying ‘NoneType’ object has no attribute ‘IMEI’. Here is my sign_up route and the imports