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

Label visibility default values #83

Closed
kylecombes opened this issue Jul 23, 2017 · 1 comment
Closed

Label visibility default values #83

kylecombes opened this issue Jul 23, 2017 · 1 comment
Labels
Milestone

Comments

@kylecombes
Copy link
Contributor

Current behavior

  • When a label defaults to visible, default: "True" (string)
  • When a label defaults to invisible, default is undefined

Desired behavior

  • When a label defaults to visible, visible: true (boolean)
  • When a label defaults to invisible, visible: false
@kylecombes kylecombes added the bug label Jul 23, 2017
@kylecombes kylecombes added this to the Shipping v1.0 milestone Jul 23, 2017
@newsch
Copy link
Collaborator

newsch commented Jul 24, 2017

Neat! This was a three-part bug:

  • the default field for labels wasn't set as required
  • the mongo_to_dict function was returning strings of BooleanFields
  • the mongo_to_dict function wasn't checking to see if fields existed in dictionary correctly - checking obj[field_name] rather than field_name in obj, so if the value of obj[field_name] was False the check for the field returned False

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants