NIFI-13235 Corrected REST API Import Process Group ID Reference

Use the PG id from the entity because component may be null if current user does not have READ permissions

This closes #8831

Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
Bryan Bende 2024-05-14 13:52:22 -04:00 committed by exceptionfactory
parent ee179f4acf
commit 35a7e87432
No known key found for this signature in database

View File

@ -1013,7 +1013,7 @@ public class ProcessGroupResource extends FlowUpdateResource<ProcessGroupImportE
if (flowSnapshot != null) {
final RevisionDTO revisionDto = entity.getRevision();
final String newGroupId = entity.getComponent().getId();
final String newGroupId = entity.getId();
final Revision newGroupRevision = new Revision(revisionDto.getVersion(), revisionDto.getClientId(), newGroupId);
// We don't want the Process Group's position to be updated because we want to keep the position where the user