Open VladimirAkopyan opened 6 years ago
What I did was a work-around. SensorHistory.Data is produced either when we:
Found that the error isn't just the app's fault - server has replied with:
https://greenhouseapi.azurewebsites.net/api/SensorsHistory/CD87474B-3C6A-4C87-938F-BC586B5540C9/1507248000/15
[
{
"Data": null,
"LocationID": "facb7a7b-f8c0-4514-acc8-665304391b61",
"SensorID": "b4ec891c-2b69-464b-9cae-8ed95d6bb244",
"TimeStamp": "2017-10-08T00:00:00+02:00",
"UploadedAt": "2017-10-07T04:13:43.0682831+00:00"
},
{
"Data": null,
"LocationID": "facb7a7b-f8c0-4514-acc8-665304391b61",
"SensorID": "7696b336-737a-4521-91c9-84f16e6ea930",
"TimeStamp": "2017-10-08T00:00:00+02:00",
"UploadedAt": "2017-10-07T04:13:43.0682831+00:00"
},
{
"Data": null,
"LocationID": "facb7a7b-f8c0-4514-acc8-665304391b61",
"SensorID": "afd4b2c7-0e1d-48cf-896a-1b528d21e5c4",
"TimeStamp": "2017-10-08T00:00:00+02:00",
"UploadedAt": "2017-10-07T04:13:43.0682831+00:00"
}
]
Meanwhile in the database these items have data!
Turns out that this isn't the end! A SensorHIstory with a data collection of null will actually crash on Merge() attempt. This is yet another error that happens during sync and needs to be corrected!