Prevent error if organization not found in mapping

chris go vet fix
pull/2755/head
Michael Desa 2018-02-05 18:20:03 -05:00
parent efd691d1b5
commit b5eca6c58a
2 changed files with 2 additions and 5 deletions

View File

@ -685,8 +685,5 @@ func UnmarshalMapping(data []byte, m *chronograf.Mapping) error {
// UnmarshalMappingPB decodes a mapping from binary protobuf data.
func UnmarshalMappingPB(data []byte, m *Mapping) error {
if err := proto.Unmarshal(data, m); err != nil {
return err
}
return nil
return proto.Unmarshal(data, m)
}

View File

@ -23,7 +23,7 @@ MappingsLoop:
if applyMapping(mapping, p) {
org, err := s.Store.Organizations(ctx).Get(ctx, chronograf.OrganizationQuery{ID: &mapping.Organization})
if err != nil {
return nil, err
continue MappingsLoop
}
for _, role := range roles {