fix(UserCredentials): Move credential update to an else statement (#16663)
Fixes situations where a new credential is created Closes #16568
This commit is contained in:
committed by
mrugesh mohapatra
parent
99afe980dc
commit
8c01f4a08f
@ -63,17 +63,18 @@ module.exports = function(UserCredential) {
|
|||||||
created: modified,
|
created: modified,
|
||||||
modified
|
modified
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
_credentials.credentials = credentials;
|
_credentials.credentials = credentials;
|
||||||
updateCredentials = observeQuery(
|
updateCredentials = observeQuery(
|
||||||
_credentials,
|
_credentials,
|
||||||
'updateAttributes',
|
'updateAttributes',
|
||||||
{
|
{
|
||||||
profile: null,
|
profile: null,
|
||||||
credentials,
|
credentials,
|
||||||
modified
|
modified
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
}
|
||||||
return Observable.combineLatest(
|
return Observable.combineLatest(
|
||||||
updateUser,
|
updateUser,
|
||||||
updateCredentials,
|
updateCredentials,
|
||||||
|
Reference in New Issue
Block a user