Sql error on initial login
cbabs opened this issue · comments
Describe the bug
On initial login using docker, login is not possible due to sqlalchemy error
To Reproduce
Steps to reproduce the behavior:
- Spin up new container
- Login with creds from env vars
- Check logs
Platform:
- OS: Ubuntu 20 LTS/Docker version 20.10.8, build 3967b7d
- Browser FF 91.0 (64-bit) and Chrome on Ubuntu
Stacktrace/error output
wg-manager | [2021-08-13 17:25:55 +0000] [12] [INFO] Application startup complete.
wg-manager | No row was found for one()
wg-manager | Traceback (most recent call last):
wg-manager | File "/app/schemas.py", line 74, in from_db
wg-manager | db_item = self.filter_query(sess).one()
wg-manager | File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/query.py", line 3500, in one
wg-manager | raise orm_exc.NoResultFound("No row was found for one()")
wg-manager | sqlalchemy.orm.exc.NoResultFound: No row was found for one()
wg-manager | No row was found for one()
wg-manager | Traceback (most recent call last):
wg-manager | File "/app/schemas.py", line 74, in from_db
wg-manager | db_item = self.filter_query(sess).one()
wg-manager | File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/query.py", line 3500, in one
wg-manager | raise orm_exc.NoResultFound("No row was found for one()")
wg-manager | sqlalchemy.orm.exc.NoResultFound: No row was found for one()
wg-manager | We did not find any records in the database that corresponds to the model. This means you are trying to fetch a unsaved schema!
wg-manager | We did not find any records in the database that corresponds to the model. This means you are trying to fetch a unsaved schema!
wg-manager | 68.53.141.76:32770 - "POST /api/v1/login HTTP/1.1" 401
wg-manager | 68.53.141.76:32770 - "POST /api/v1/login HTTP/1.1" 401