Skip to content

Commit 19de1f2

Browse files
Merge pull request #56 from dimiboi/events-propagation-fix
Fixed propagation of digital twin events through the graph
2 parents b90d184 + 0d90d7b commit 19de1f2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

AdtSampleApp/SampleFunctionsApp/AdtUtilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static async Task UpdateTwinPropertyAsync(DigitalTwinsClient client, stri
5757
try
5858
{
5959
var updateTwinData = new JsonPatchDocument();
60-
updateTwinData.AppendAdd(propertyPath, value);
60+
updateTwinData.AppendReplace(propertyPath, value);
6161

6262
log.LogInformation($"UpdateTwinPropertyAsync sending {updateTwinData}");
6363
await client.UpdateDigitalTwinAsync(twinId, updateTwinData);

AdtSampleApp/SampleFunctionsApp/ProcessHubToDTEvents.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public async void Run([EventGridTrigger]EventGridEvent eventGridEvent, ILogger l
4747

4848
//Update twin using device temperature
4949
var updateTwinData = new JsonPatchDocument();
50-
updateTwinData.AppendAdd("/Temperature", temperature.Value<double>());
50+
updateTwinData.AppendReplace("/Temperature", temperature.Value<double>());
5151
await client.UpdateDigitalTwinAsync(deviceId, updateTwinData);
5252
}
5353
}

0 commit comments

Comments
 (0)