fix small issue in sql.py which cause AttributeError by io614 · Pull Request #1 · io614/python-cs50 · GitHub
Skip to content

fix small issue in sql.py which cause AttributeError#1

Open
io614 wants to merge 1 commit into
developfrom
golemarms-sql-fix
Open

fix small issue in sql.py which cause AttributeError#1
io614 wants to merge 1 commit into
developfrom
golemarms-sql-fix

Conversation

@io614

@io614 io614 commented Nov 29, 2020

Copy link
Copy Markdown
Owner

When debug mode is off, sometimes a

AttributeError: '_AppCtxGlobals' object has no attribute '_connection' 

is thrown. This is solved by checking that _connection exists in the flask application context before looking up its value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant