Skip to content

Commit

Permalink
fix: set issues when no issues are detected also
Browse files Browse the repository at this point in the history
this will clear devices which previously had issues
  • Loading branch information
sechmann committed Jun 26, 2024
1 parent 2c55639 commit ac5e2ca
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions internal/apiserver/kolide/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,9 @@ func (kc *client) FillKolideData(ctx context.Context, devices []*pb.Device) erro
}

device.ExternalID = fmt.Sprint(kolideDevice.ID)
device.Issues = issuesByExternalID[device.ExternalID]
if kolideDevice.LastSeenAt != nil {
lastSeenAt := *kolideDevice.LastSeenAt
device.LastSeen = timestamppb.New(lastSeenAt)
}
if issues, found := issuesByExternalID[device.ExternalID]; found {
device.Issues = issues
device.LastSeen = timestamppb.New(*kolideDevice.LastSeenAt)
}
}

Expand Down

0 comments on commit ac5e2ca

Please sign in to comment.