Skip to content
Snippets Groups Projects

Issue #3265548 by Xiaohua Guan, yas: Fix undefined index openstack_key_pair (OpenStack)

Closed Issue #3265548 by Xiaohua Guan, yas: Fix undefined index openstack_key_pair (OpenStack)
All threads resolved!
Closed xiaohua guan requested to merge issue/cloud-3265548:3265548-fix-undefined-index into 5.x
All threads resolved!
Files
2
@@ -73,17 +73,21 @@ class KeyPairEditForm extends AwsCloudContentForm {
$this->trimTextfields($form, $form_state);
$entity = $this->entity;
$bundle = str_contains($entity->bundle(), 'aws_cloud')
? 'aws_cloud' : 'openstack';
$uid_key_name = $this->cloudService->getTagCreatedByUid(
'aws_cloud',
$bundle,
$entity->getCloudContext());
$this->ec2Service->setCloudContext($entity->getCloudContext());
if ($entity->save()) {
$this->setTagsInAws($entity->getKeyPairId(), [
$this->setTagsInAws($entity->getKeyPairName(), [
$entity->getEntityTypeId() . '_' . $uid_key_name => !empty($entity->getOwner())
? $entity->getOwner()->id() : 0,
]);
], $entity->getEntityTypeId());
}
$this->processOperationStatus($entity, 'updated');
Loading