mirror of https://github.com/apache/nifi.git
parent
c3b4872b55
commit
15d1e1bbf8
|
@ -194,7 +194,7 @@ public class StandardSnippetDAO implements SnippetDAO {
|
|||
final Snippet snippet = locateSnippet(snippetDTO.getId());
|
||||
|
||||
// if the group is changing move it
|
||||
if (snippetDTO.getParentGroupId() != null && snippet.getParentGroupId() != snippetDTO.getParentGroupId()) {
|
||||
if (snippetDTO.getParentGroupId() != null && !snippet.getParentGroupId().equals(snippetDTO.getParentGroupId())) {
|
||||
// get the current process group
|
||||
final ProcessGroup processGroup = flowController.getGroup(snippet.getParentGroupId());
|
||||
if (processGroup == null) {
|
||||
|
@ -217,7 +217,7 @@ public class StandardSnippetDAO implements SnippetDAO {
|
|||
final StandardSnippet snippet = locateSnippet(snippetDTO.getId());
|
||||
|
||||
// if the group is changing move it
|
||||
if (snippetDTO.getParentGroupId() != null && snippet.getParentGroupId() != snippetDTO.getParentGroupId()) {
|
||||
if (snippetDTO.getParentGroupId() != null && !snippet.getParentGroupId().equals(snippetDTO.getParentGroupId())) {
|
||||
final ProcessGroup currentProcessGroup = flowController.getGroup(snippet.getParentGroupId());
|
||||
if (currentProcessGroup == null) {
|
||||
throw new IllegalArgumentException("The current process group could not be found.");
|
||||
|
|
Loading…
Reference in New Issue