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

remove falsy check for nulls in method parameters #5119

Merged
merged 3 commits into from
Aug 9, 2024

Conversation

shemogumbe
Copy link
Contributor

@shemogumbe shemogumbe commented Aug 9, 2024

Closes microsoftgraph/msgraph-sdk-python#795

Note that

if not column is falsy even if colum exists and is zero, using if column is None will check that column is null in a better way in this case:

The generated code behavior is now adjusted from

if not body:
    raise TypeError("body cannot be null.")
request_info = self.to_patch_request_information(
        body, request_configuration
    )

To

if body is None:
    raise TypeError("body cannot be null.")
request_info = self.to_patch_request_information(
        body, request_configuration
    )

And the same applies in all areas including drive items

@shemogumbe shemogumbe requested a review from a team as a code owner August 9, 2024 15:12
shemogumbe and others added 2 commits August 9, 2024 18:23
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
@baywet baywet enabled auto-merge August 9, 2024 16:16
Copy link

sonarqubecloud bot commented Aug 9, 2024

@baywet baywet merged commit 71344c2 into main Aug 9, 2024
209 checks passed
@baywet baywet deleted the shem/fix_null_for_zero_error branch August 9, 2024 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Cannot retrieve cell value when column or row are zero
2 participants