Skip to content

Commit

Permalink
Merge pull request #858 from cgslivre/2.0
Browse files Browse the repository at this point in the history
MSSQL: Fix TypeError: 'NoneType' object is not iterable
  • Loading branch information
josephmancuso authored Sep 30, 2023
2 parents 1adac4b + 0e0ead2 commit 64675ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/masoniteorm/connections/MSSQLConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def query(self, query, bindings=(), results="*"):
return {}
columnNames = [column[0] for column in cursor.description]
result = cursor.fetchone()
return dict(zip(columnNames, result))
return dict(zip(columnNames, result)) if result != None else {}
else:
if not cursor.description:
return {}
Expand Down

0 comments on commit 64675ab

Please sign in to comment.