Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

fix: Check for valid index before setting name property #480

Merged

Conversation

mikedingjan
Copy link
Contributor

@mikedingjan mikedingjan commented Jun 29, 2020

This commit fixes a bug when using the timer trigger where it tries to set the name of the binding. The name of the binding can't be set since there is no index found (-1)

Fixes: #444

This commit fixes a bug when using the timer trigger where it tries to
set the name of the binding. The name of the binding can't be set since
there is no index found (-1)

Fixes: serverless#444
@tbarlow12
Copy link
Contributor

@mikedingjan thanks for the fix! Any way we can get a unit test or two to validate the change?

@mikedebock
Copy link
Contributor

@tbarlow12 Thank you for your feedback. I'm also waiting for this fix, because of that I added the unittest :)

Copy link
Contributor

@tbarlow12 tbarlow12 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the fix!

@tbarlow12
Copy link
Contributor

@mikedingjan and @mikedebock thanks for the help here. This is the 2nd issue I've seen relating to binding creation, and it might be an issue with the backwards compatibility of x-azure-settings. You should be able to bring everything up one level and remove that property entirely. But I'll investigate further when I get some time

@tbarlow12 tbarlow12 merged commit 002044e into serverless:master Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot set property 'name' of undefined Python timer
3 participants