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

KeyError when returned json_body misses Redfish.Required property #186

Closed
etamsza opened this issue Jan 21, 2020 · 0 comments · Fixed by #187
Closed

KeyError when returned json_body misses Redfish.Required property #186

etamsza opened this issue Jan 21, 2020 · 0 comments · Fixed by #187

Comments

@etamsza
Copy link

etamsza commented Jan 21, 2020

This line:

if property.Name not in json_payload[property.Name] :

causes KeyError when checking if properties marked with 'Redfish.Required' in the schema are not present in the returned json_body.

The test should probably be something like this instead:

if property.Name not in json_payload.keys() :

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 a pull request may close this issue.

1 participant