From e18e75b97286e6f88ce16708f06cb9c473fcd9fe Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 24 Jan 2020 20:47:57 +0000 Subject: [PATCH] --- server/AyaNova/biz/UserBiz.cs | 1 + server/AyaNova/util/Seeder.cs | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/server/AyaNova/biz/UserBiz.cs b/server/AyaNova/biz/UserBiz.cs index 14291129..d82e66a9 100644 --- a/server/AyaNova/biz/UserBiz.cs +++ b/server/AyaNova/biz/UserBiz.cs @@ -25,6 +25,7 @@ namespace AyaNova.Biz { ct = dbcontext; UserId = currentUserId; + UserLocaleId = userLocaleId; CurrentUserRoles = userRoles; BizType = AyaType.User; SeedOrImportRelaxedRulesMode = false;//default diff --git a/server/AyaNova/util/Seeder.cs b/server/AyaNova/util/Seeder.cs index e883461e..05236357 100644 --- a/server/AyaNova/util/Seeder.cs +++ b/server/AyaNova/util/Seeder.cs @@ -507,8 +507,12 @@ namespace AyaNova.Util - public static void GenSeedUser(ILogger log, int count, AuthorizationRoles roles, UserType userType, decimal timeZoneOffset, bool active = true, string login = null, string password = null, long localeId = 0) + public static void GenSeedUser(ILogger log, int count, AuthorizationRoles roles, UserType userType, decimal timeZoneOffset, + bool active = true, string login = null, string password = null, long localeId = 0) { + if (localeId == 0) + localeId = ServerBootConfig.AYANOVA_DEFAULT_LANGUAGE_ID; + using (var cct = ServiceProviderProvider.DBContext) { UserBiz Biz = UserBiz.GetBizInternal(cct); @@ -538,7 +542,7 @@ namespace AyaNova.Util else u.Password = u.Login; u.Roles = roles; - u.LocaleId = localeId == 0 ? ServerBootConfig.AYANOVA_DEFAULT_LANGUAGE_ID : localeId; + u.LocaleId = localeId; u.UserType = userType; u.EmployeeNumber = "A-" + (454 + SeededUserCount).ToString() + "-Y"; u.Notes = Fake.Lorem.Sentence();//Fake.Lorem.Paragraph(2);