When a DEP sync event was serialized and deserialized, the dep.Device.ProfileStatus property was not included so its value was not later copied to device.Device.ProfileStatus and saved to the database. (#682)

Co-authored-by: Dan Lamppa <dan.lamppa@medtronic.com>
This commit is contained in:
Dan Lamppa
2020-07-07 17:30:23 -05:00
committed by GitHub
parent 18f5451d07
commit c6c95bb9bc

View File

@@ -35,6 +35,7 @@ func MarshalEvent(e *Event) ([]byte, error) {
Description: d.Description,
Color: d.Color,
AssetTag: d.AssetTag,
ProfileStatus: d.ProfileStatus,
ProfileUuid: d.ProfileUUID,
ProfileAssignTime: d.ProfileAssignTime.UnixNano(),
ProfilePushTime: d.ProfilePushTime.UnixNano(),
@@ -69,6 +70,7 @@ func UnmarshalEvent(data []byte, e *Event) error {
Description: d.GetDescription(),
Color: d.GetColor(),
AssetTag: d.GetAssetTag(),
ProfileStatus: d.GetProfileStatus(),
ProfileUUID: d.GetProfileUuid(),
ProfileAssignTime: time.Unix(0, d.GetProfileAssignTime()).UTC(),
ProfilePushTime: time.Unix(0, d.GetProfilePushTime()).UTC(),