Skip to content

Commit

Permalink
Fix "Expected value reference of type STRING but got PARAMETER" Excep…
Browse files Browse the repository at this point in the history
…tion when using a parameter for a stream title (#20244)

StreamReferenceFacade uses asString() without parameter mapping when retrieving the stream title from a content pack. This leads to the aforementioned Exception, while installing a content pack containing a stream title with attached parameter.
  • Loading branch information
jrunu authored Aug 27, 2024
1 parent a9872f7 commit 7ec1778
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public NativeEntity<Stream> createNativeEntity(Entity entity,

private Optional<NativeEntity<Stream>> findExisting(EntityV1 entity, Map<String, ValueReference> parameters) {
final StreamReferenceEntity streamEntity = objectMapper.convertValue(entity.data(), StreamReferenceEntity.class);
final List<Stream> streams = streamService.loadAllByTitle(streamEntity.title().asString());
final List<Stream> streams = streamService.loadAllByTitle(streamEntity.title().asString(parameters));
if (streams.size() == 1) {
final Stream stream = streams.get(0);
return Optional.of(NativeEntity.create(entity.id(), stream.getId(), ModelTypes.STREAM_V1, stream.getTitle(), stream));
Expand Down

0 comments on commit 7ec1778

Please sign in to comment.