Merge pull request #349 from HojouFotytu/develop

2.8.5 - empty months
This commit is contained in:
HojouFotytu 2024-04-14 08:52:47 +09:00 committed by GitHub
commit 0d5079c1e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -567,7 +567,10 @@ namespace Core.Main.DataObjects
if (extraSection != null) if (extraSection != null)
{ {
JArray monthlyStatsSection = (JArray)extraSection["monthlyStats"]; JArray monthlyStatsSection = (JArray)extraSection["monthlyStats"];
_monthlyStats = monthlyStatsSection.Select(j => BuildMonthlyStatsData(j as JObject)).ToList(); _monthlyStats = monthlyStatsSection
.Where(j => j["totalSales"] != null && (double)j["totalSales"] != 0 && j["avgGrowth"] != null)
.Select(j => BuildMonthlyStatsData(j as JObject))
.ToList();
_monthlyStatsRefresh = DateTime.UtcNow.AddSeconds(_systemConfiguration.GeneralSettings.Monitor.DashboardChartsRefreshSeconds - 1); _monthlyStatsRefresh = DateTime.UtcNow.AddSeconds(_systemConfiguration.GeneralSettings.Monitor.DashboardChartsRefreshSeconds - 1);
} }
} }

View File

@ -6,7 +6,7 @@ using Core.Helper;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
[assembly: AssemblyVersion("2.8.4")] [assembly: AssemblyVersion("2.8.5")]
[assembly: AssemblyProduct("PT Magic")] [assembly: AssemblyProduct("PT Magic")]
namespace PTMagic namespace PTMagic