Skip to content
This repository was archived by the owner on Oct 15, 2021. It is now read-only.

Handle empty fields as undefined in the XML file.#62

Closed
Natim wants to merge 1 commit intomasterfrom
some-empty-fields-should-be-handle-as-undefined
Closed

Handle empty fields as undefined in the XML file.#62
Natim wants to merge 1 commit intomasterfrom
some-empty-fields-should-be-handle-as-undefined

Conversation

@Natim
Copy link
Copy Markdown
Contributor

@Natim Natim commented Feb 15, 2017

@Natim Natim requested a review from glasserc February 15, 2017 16:05
Copy link
Copy Markdown
Contributor

@glasserc glasserc left a comment

Choose a reason for hiding this comment

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

I feel like I don't have context on what's going on here but this looks OK to me. Are we trying to preserve falsy items, or strip them out? I guess strip them out, but the diff in mozilla-services/kinto-dist#109 seems to suggest that we need to preserve them?


for field in ['name', 'os']:
if field in item:
if field in item and item[field]:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are these dicts? Can you use get?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes I guess I can. I don't know why the functional test if failling though.

@Natim
Copy link
Copy Markdown
Contributor Author

Natim commented Feb 24, 2017

This was fixed in the jsonschema

@Natim Natim closed this Feb 24, 2017
@Natim Natim deleted the some-empty-fields-should-be-handle-as-undefined branch February 24, 2017 14:47
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.

2 participants