Closed PatchFramework closed 3 years ago
The Webapp errors on startup.
It looks like the problem is a combination of the init_db() and test() function in legerible.py.
init_db() executes init.sql which deletes all existing tables and then creates new ones.
test() checks if a SQL query can be executed and if not it calls init_db()
Usually it should be executed like so:
test() -> db not initilized yet -> init_db() -> db initilized -> test() -> success
In reality it is executed like so:
test() -> db not initilized yet -> init_db() -> test() -> ERROR -> db initilized -> test() -> success
The Webapp errors on startup.
It looks like the problem is a combination of the init_db() and test() function in legerible.py.
init_db() executes init.sql which deletes all existing tables and then creates new ones.
test() checks if a SQL query can be executed and if not it calls init_db()
Usually it should be executed like so:
test() -> db not initilized yet -> init_db() -> db initilized -> test() -> success
In reality it is executed like so:
test() -> db not initilized yet -> init_db() -> test() -> ERROR -> db initilized -> test() -> success