From 822bc135e08d08b3f42fee56e2326e428f44acff Mon Sep 17 00:00:00 2001 From: "Brady Stroud [SSW]" Date: Mon, 8 Jul 2024 14:00:02 +0930 Subject: [PATCH] Remove unessesary created date update --- SSW.Rules.AzFuncs/Functions/History/UpdateRuleHistory.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SSW.Rules.AzFuncs/Functions/History/UpdateRuleHistory.cs b/SSW.Rules.AzFuncs/Functions/History/UpdateRuleHistory.cs index 2aed3d4..6bf3fcc 100644 --- a/SSW.Rules.AzFuncs/Functions/History/UpdateRuleHistory.cs +++ b/SSW.Rules.AzFuncs/Functions/History/UpdateRuleHistory.cs @@ -39,6 +39,10 @@ public async Task Run( var result = await dbContext.RuleHistoryCache.Query(q => q.Where(w => w.MarkdownFilePath == historyEntry.file)); var historyCache = result.FirstOrDefault(); + _logger.LogInformation($"filename: {historyEntry.file}"); + _logger.LogInformation($"Last updated: {historyEntry.lastUpdated}"); + _logger.LogInformation($"Created: {historyEntry.created}"); + if (historyCache == null) { await dbContext.RuleHistoryCache.Add(new RuleHistoryCache @@ -57,9 +61,6 @@ await dbContext.RuleHistoryCache.Add(new RuleHistoryCache historyCache.ChangedAtDateTime = DateTime.ParseExact(historyEntry.lastUpdated, DateFormat, _provider); historyCache.ChangedByDisplayName = historyEntry.lastUpdatedBy; historyCache.ChangedByEmail = historyEntry.lastUpdatedByEmail; - historyCache.CreatedAtDateTime = DateTime.ParseExact(historyEntry.created, DateFormat, _provider); - historyCache.CreatedByDisplayName = historyEntry.createdBy; - historyCache.CreatedByEmail = historyEntry.createdByEmail; await dbContext.RuleHistoryCache.Update(historyCache); } }