This commit is contained in:
@@ -83,8 +83,6 @@ namespace AyaNova.Biz
|
|||||||
newUniqueName = Util.StringUtil.UniqueNameBuilder(proposedName, l++, 255);
|
newUniqueName = Util.StringUtil.UniqueNameBuilder(proposedName, l++, 255);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<ReportBiz>();
|
|
||||||
log.LogInformation($"Import report '{proposedName}' skipped due to already present in database.");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -98,6 +96,11 @@ namespace AyaNova.Biz
|
|||||||
await ct.Report.AddAsync(newObject);
|
await ct.Report.AddAsync(newObject);
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, AyaEvent.Created), ct);
|
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, AyaEvent.Created), ct);
|
||||||
|
if (skipIfAlreadyPresent)
|
||||||
|
{
|
||||||
|
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<ReportBiz>();
|
||||||
|
log.LogInformation($"Missing stock report '{proposedName}' imported");
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user