Wizard: race condition with activation key
Fixes #2961 Activation key loads in background even if a user skips to the review step. The unwrap is there to extract only the actual response data, if the query fails, the exception will be caught in the catch block anyways, so there was no need to keep the whole action object. And the refetch was being called before the createActivationKey query was initiallized, throwing an error and not letting the async query in try block to finish fetching the activation key.
This commit is contained in:
parent
756e7427d6
commit
17f975e0ef
1 changed files with 2 additions and 2 deletions
|
|
@ -164,12 +164,12 @@ const ActivationKeysList = () => {
|
|||
name: defaultActivationKeyName,
|
||||
serviceLevel: 'Self-Support',
|
||||
},
|
||||
});
|
||||
}).unwrap();
|
||||
|
||||
window.localStorage.setItem(
|
||||
'imageBuilder.recentActivationKey',
|
||||
defaultActivationKeyName
|
||||
);
|
||||
refetch();
|
||||
dispatch(changeActivationKey(defaultActivationKeyName));
|
||||
} catch (error) {
|
||||
dispatch(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue