CreateImageWizard: Fix passing gcp upload_options

Upload options were added in the wrong place, this inserts them back
into the correct place.

Also see #1355.
This commit is contained in:
Sanne Raymaekers 2023-12-01 10:50:56 +01:00
parent 54770c766d
commit ae7178158e

View file

@ -128,7 +128,7 @@ const onSave = (values) => {
if (values['target-environment']?.gcp) {
let share = '';
if (values['image_sharing'] === 'gcp-account') {
if (values['image-sharing'] === 'gcp-account') {
switch (values['google-account-type']) {
case 'googleAccount':
share = `user:${values['google-email']}`;
@ -165,7 +165,9 @@ const onSave = (values) => {
};
if (share !== '') {
request.options = [share];
request.image_requests[0].upload_request.options.share_with_accounts = [
share,
];
}
requests.push(request);
}