tjmisko / sspi-data-collection

https://sspi.world
0 stars 1 forks source link

Login Issue - secretkey column not found? #191

Closed justinlaskowski closed 7 months ago

justinlaskowski commented 7 months ago

Screenshot (45)

Error message attached in screenshot. Registering new usernames and password doesn't work. Issue with my database?

tjmisko commented 7 months ago

Delete the file instance/database.db and recreate it. This will drop all of the local data you have for logging in to the protected part of the backend, so you'll need to reregister via /register. Comment out @fresh_login_required on the register route to be able to access it with the app running.

The problem is that the SQL table that is in your database doesn't have a field for the updated User model, which now contains the field secretkey in the Flask App but not in the table it draws from. It would almost certainly be possible to update the existing table, but it's not worth the fuss. This fuss around slight changes to the fields in the data causing issues is one reason why we're using MongoDB (NoSQL) instead of SQL to handle our slightly messy data.