Fixing issue which can block accessing platform - if error scenario occurs but admin user partially created.
This commit is contained in:
parent
f0d324c675
commit
dae9ab94a4
|
@ -60,11 +60,13 @@ export const adminUser = async (ctx: any) => {
|
||||||
tenantId,
|
tenantId,
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
// always bust checklist beforehand, if an error occurs but can proceed, don't get
|
||||||
|
// stuck in a cycle
|
||||||
|
await cache.bustCache(cache.CacheKeys.CHECKLIST)
|
||||||
const finalUser = await users.save(user, {
|
const finalUser = await users.save(user, {
|
||||||
hashPassword,
|
hashPassword,
|
||||||
requirePassword,
|
requirePassword,
|
||||||
})
|
})
|
||||||
await cache.bustCache(cache.CacheKeys.CHECKLIST)
|
|
||||||
|
|
||||||
// events
|
// events
|
||||||
let account: CloudAccount | undefined
|
let account: CloudAccount | undefined
|
||||||
|
|
Loading…
Reference in New Issue