diff --git a/src/backend/model/database/SQLConnection.ts b/src/backend/model/database/SQLConnection.ts index 97ce343c..1da14657 100644 --- a/src/backend/model/database/SQLConnection.ts +++ b/src/backend/model/database/SQLConnection.ts @@ -125,7 +125,8 @@ export class SQLConnection { // Add dummy Admin to the db const admins = await userRepository.findBy({role: UserRoles.Admin}); - if (admins.length === 0) { + const devs = await userRepository.findBy({role: UserRoles.Developer}); + if (admins.length === 0 && devs.length === 0) { const a = new UserEntity(); a.name = 'admin'; a.password = PasswordHelper.cryptPassword('admin');