update migrationAssignSuperadmin

This commit is contained in:
Maidul Islam
2023-11-13 16:54:20 -05:00
parent 4ac3669756
commit 9fbf01c19e

View File

@@ -860,8 +860,7 @@ export const migrationAssignSuperadmin = async () => {
return; return;
} }
const isNewInstance = !users.length; if (users.length) {
if (!isNewInstance) {
let superAdminUserId = ""; let superAdminUserId = "";
const firstAccount = users?.[0]; const firstAccount = users?.[0];
if (firstAccount.email === "test@localhost.local" && users.length === 2) { if (firstAccount.email === "test@localhost.local" && users.length === 2) {