Skip to content

Commit

Permalink
Fix parsing of integer label_type in yaml (kolide#2276)
Browse files Browse the repository at this point in the history
  • Loading branch information
zwass authored Aug 6, 2020
1 parent 0619581 commit 34c4ce4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/kolide/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ func (t LabelType) MarshalJSON() ([]byte, error) {

func (t *LabelType) UnmarshalJSON(b []byte) error {
switch string(b) {
case `"regular"`:
case `"regular"`, "0":
*t = LabelTypeRegular
case `"builtin"`:
case `"builtin"`, "1":
*t = LabelTypeBuiltIn
default:
return errors.Errorf("invalid LabelType: %s", string(b))
Expand Down

0 comments on commit 34c4ce4

Please sign in to comment.