-
Notifications
You must be signed in to change notification settings - Fork 80
Closed
Description
$ bash init.sh
Run migrations
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
Create initial data in DB
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/laptop/playground/backend/api/app/initial_data.py", line 12, in <module>
from app.core import config, security
File "/home/laptop/playground/backend/api/app/core/security.py", line 55, in <module>
def generate_access_token_response(subject: str | int):
TypeError: unsupported operand type(s) for |: 'type' and 'type'The following line throws an error during executing bash init.sh
class JWTTokenPayload(BaseModel):
sub: str | int #-----> This line
refresh: bool
issued_at: int
expires_at: intI fixed it by using sub: str and modifying the other related methods.
What's wrong with sub: str | int ?
iahsanujunda
Metadata
Metadata
Assignees
Labels
No labels