Commit a41f8831 authored by Masami  Suzuki's avatar Masami Suzuki Committed by Yas Naoi
Browse files

Issue #3085710 by Masami, yas: Fix an exception when the AWS error occurs on copying Security Group

parent e50438eb
Loading
Loading
Loading
Loading
+2 −1
Changes for modules/cloud_service_providers/aws_cloud/src/Form/Ec2/SecurityGroupCopyForm.php: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -140,13 +140,14 @@ class SecurityGroupCopyForm extends SecurityGroupEditForm {
          '@label' => $entity->getEntityType()->getLabel(),
          '@group_name' => $entity->getGroupName(),
        ]));

        $form_state->setRedirectUrl($entity->toUrl('canonical'));
      }
    }
    else {
      $this->messenger->addError($this->t('Unable to update security group.'));
    }

    $form_state->setRedirectUrl($entity->toUrl('canonical'));
  }

  /**