Skip to content

Commit 259d0bb

Browse files
Server will no longer send null sensorHisotry #77
This was caused by incorrect "fix" to #77 and #8 should hopefully never bother me again
1 parent a9f38dd commit 259d0bb

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

GhAPIAzure/Controllers/Auth/SensorsHistoryController.cs

+2-7
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,13 @@ public async Task<HttpResponseMessage> GetSensorsHistory(Guid deviceId, long uni
7979
for (var i = 0; i < sensorHistories.Count; i++)
8080
{
8181
var hist = sensorHistories[i];
82-
hist.DeserialiseData();
82+
83+
hist.DeserialiseData(); // We were not de-serialising all the data!
8384

8485
if (hist.TimeStamp.Date == oldestDate)
8586
{
8687
sensorHistories[i] = hist.Slice(afterTime);
8788
}
88-
else
89-
{
90-
// Items are sorted /ordered by date
91-
// so there should be no more first day items
92-
break;
93-
}
9489
}
9590

9691
//timer.Stop();

0 commit comments

Comments
 (0)