Skip to content

Allow null value when blob doesnt exist #40

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

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions azure/functions/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ def encode(cls, obj: typing.Any, *,

@classmethod
def decode(cls, data: meta.Datum, *, trigger_metadata) -> typing.Any:
if data is None or data.type is None:
return None

Comment on lines +78 to +80
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kolafsson, thanks for contributing to azure-functions-python-library

Please add a few unit tests regarding to this scenario.
Unit test examples: https://github.com/Azure/azure-functions-python-library/pull/28/files#diff-c27162ae93fd2aa43a783ef13d1749f4R9-R12

Thanks.

data_type = data.type

if data_type == 'string':
Expand Down