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

Lambda integration is not called when isBase64Encoded evaluates to False #184

Closed
adipon opened this issue Jul 8, 2021 · 1 comment
Closed

Comments

@adipon
Copy link

adipon commented Jul 8, 2021

if event.get("version") is None and event.get("isBase64Encoded") is None:

When the isBase64Encoded parameter is set to False, then the conditional check on line 169 will evaluate to False and False != None.
Additional information can be found at https://towardsdatascience.com/python-the-boolean-confusion-f7fc5288f0ce

A proposed solution for the line is as follows:

if not event.get("version") is None and not event.get("isBase64Encoded"):

@adipon
Copy link
Author

adipon commented Jul 8, 2021

Also, on line 312
path_info = event[u"requestPath"]

This field is not guaranteed to be available in requests. During testing with Django 3.1.3, lambda trigger events did not contain a requestPath field. Rather, they contained a path field

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

No branches or pull requests

2 participants