Skip to content

Commit

Permalink
fix _policy enrichment on ThingCreated event
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksandar Stanchev <aleksandar.stanchev@bosch.com>
  • Loading branch information
alstanchev committed Jan 15, 2024
1 parent be1b9c6 commit 96cdbd5
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -219,8 +219,9 @@ private CompletableFuture<JsonObject> smartUpdateCachedObject(final SignalEnrich
final var nextExpectedThingEventsParameters =
new CachingParameters(fieldSelector, thingEvents, invalidateCacheOnPolicyChange,
cachingParameters.minAcceptableSeqNr);
result = handleNextExpectedThingEvents(cacheKey, JsonObject.empty(), nextExpectedThingEventsParameters)
.toCompletableFuture();
result = doCacheLookup(cacheKey, dittoHeaders).thenCompose(
cachedJsonObject -> handleNextExpectedThingEvents(cacheKey, cachedJsonObject,
nextExpectedThingEventsParameters));
} else {
// there are twin events; perform smart update
result = doCacheLookup(cacheKey, dittoHeaders).thenCompose(
Expand Down

0 comments on commit 96cdbd5

Please sign in to comment.