This commit is contained in:
2021-01-25 18:57:37 +00:00
parent 22232450d7
commit 936452cdb4
5 changed files with 6 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ namespace AyaNova.Biz
internal async Task<GlobalBizSettings> GetAsync(bool logTheGetEvent = true)
{
//first try to fetch from db
var ret = await ct.GlobalBizSettings.SingleOrDefaultAsync(m => m.Id == 1);
var ret = await ct.GlobalBizSettings.AsNoTracking().SingleOrDefaultAsync(m => m.Id == 1);
if (logTheGetEvent && ret != null)
{
//Log
@@ -80,7 +80,7 @@ namespace AyaNova.Biz
//Log modification and save context
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, 1, BizType, AyaEvent.Modified), ct);
//Update the static copy for the server
ServerGlobalBizSettings.Initialize(dbObject);
ServerGlobalBizSettings.Initialize(putObject);
return dbObject;
}