File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 22This changelog references the relevant changes done in 2.x versions.
33
44
5+ ## v2.1.5
6+ * Do not set event slug unless schema has that field in ` Aggregate::[un]lockNode ` .
7+
8+
59## v2.1.4
610* Ensure only unique index names are used in ` ElasticaNcrSearch::searchNodes ` .
711
Original file line number Diff line number Diff line change @@ -313,7 +313,7 @@ public function lockNode(Message $command): void
313313 $ this ->copyContext ($ command , $ event );
314314 $ event ->set ('node_ref ' , $ this ->nodeRef );
315315
316- if ($ this ->node ->has ('slug ' )) {
316+ if ($ this ->node ->has ('slug ' ) && $ event :: schema ()-> hasField ( ' slug ' ) ) {
317317 $ event ->set ('slug ' , $ this ->node ->get ('slug ' ));
318318 }
319319
@@ -481,7 +481,7 @@ public function unlockNode(Message $command): void
481481 $ this ->copyContext ($ command , $ event );
482482 $ event ->set ('node_ref ' , $ this ->nodeRef );
483483
484- if ($ this ->node ->has ('slug ' )) {
484+ if ($ this ->node ->has ('slug ' ) && $ event :: schema ()-> hasField ( ' slug ' ) ) {
485485 $ event ->set ('slug ' , $ this ->node ->get ('slug ' ));
486486 }
487487
You can’t perform that action at this time.
0 commit comments