Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSSQL: Fix TypeError: 'NoneType' object is not iterable #858

Merged
merged 1 commit into from
Sep 30, 2023

Conversation

cgslivre
Copy link
Contributor

Scenario:

Get a record(first) and no record in the bank meets the query criteria

result = QueryBuilder.table('a').where('column', aInvalidValue).first()

As the return is null (None) it generates an exception!

Fix TypeError: 'NoneType' object is not iterable

Traceback (most recent call last):
  File ".../masoniteorm/connections/MSSQLConnection.py", line 156, in query
    return dict(zip(columnNames, result))
                ^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
@cgslivre cgslivre changed the title Fix TypeError: 'NoneType' object is not iterable MSSQL: Fix TypeError: 'NoneType' object is not iterable Sep 30, 2023
@josephmancuso josephmancuso merged commit 64675ab into MasoniteFramework:2.0 Sep 30, 2023
4 of 5 checks passed
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.

2 participants