Skip to content

Fix allow extra in locative webhook schema validation#20657

Merged
rohankapoorcom merged 2 commits into
home-assistant:devfrom
rohankapoorcom:locative-webhook-fix
Feb 1, 2019
Merged

Fix allow extra in locative webhook schema validation#20657
rohankapoorcom merged 2 commits into
home-assistant:devfrom
rohankapoorcom:locative-webhook-fix

Conversation

@rohankapoorcom
Copy link
Copy Markdown
Member

Description:

Locative sends several extra keys that we don't care about when it sends the webhook request. Since we hadn't set extra=vol.ALLOW_EXTRA or defined those keys in the schema, it was getting rejected. Since we don't care about the values in those keys, we should just allow the extra keys to be sent.

Related issue (if applicable): fixes #20566

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

@ghost ghost assigned rohankapoorcom Feb 1, 2019
@ghost ghost added the in progress label Feb 1, 2019
@rohankapoorcom rohankapoorcom modified the milestones: 0.86.5, 0.87.0 Feb 1, 2019
Comment thread homeassistant/components/locative/__init__.py Outdated
@MartinHjelmare MartinHjelmare changed the title Allow extra in locative webhook schema validation (fixes #20566) Fix allow extra in locative webhook schema validation Feb 1, 2019
Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Thanks!

@MartinHjelmare
Copy link
Copy Markdown
Member

Can be merged when build passes.

@rohankapoorcom rohankapoorcom merged commit 3e2dae6 into home-assistant:dev Feb 1, 2019
@ghost ghost removed the in progress label Feb 1, 2019
@rohankapoorcom rohankapoorcom deleted the locative-webhook-fix branch February 1, 2019 08:40
@rohankapoorcom rohankapoorcom modified the milestones: 0.87.0, 0.86.5 Feb 1, 2019
balloob pushed a commit that referenced this pull request Feb 2, 2019
* Allow extra in locative webhook schema validation (fixes #20566)

* Remove extra attribute
@balloob balloob mentioned this pull request Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Locative with Webhook not working

5 participants