From 482ae91e9ff5469c4a643e454229ef270afe8fb8 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Fri, 22 Nov 2013 03:59:24 +0000 Subject: [PATCH] One minor bugfix; preparing for deployment of Payout/Transaction/CashAdvance fixes --- Logic/Swarm/DashboardTodos.cs | 6 ++++++ Site5/Pages/v5/Ledgers/DebugLedgers.aspx.cs | 2 ++ Utility/Communications/CommsTransmitterMail.cs | 1 + 3 files changed, 9 insertions(+) diff --git a/Logic/Swarm/DashboardTodos.cs b/Logic/Swarm/DashboardTodos.cs index 0b1160c4..95f4434e 100644 --- a/Logic/Swarm/DashboardTodos.cs +++ b/Logic/Swarm/DashboardTodos.cs @@ -40,6 +40,12 @@ namespace Swarmops.Logic.Swarm ExpenseClaims claims = ExpenseClaims.ForOrganization(organization); claims = claims.WhereUnvalidated; + if (claims.Count == 0) + { + // nothing to add + return; + } + DashboardTodo todo = new DashboardTodo(); if (claims.Count > 1) diff --git a/Site5/Pages/v5/Ledgers/DebugLedgers.aspx.cs b/Site5/Pages/v5/Ledgers/DebugLedgers.aspx.cs index a9a99832..8c70f41f 100644 --- a/Site5/Pages/v5/Ledgers/DebugLedgers.aspx.cs +++ b/Site5/Pages/v5/Ledgers/DebugLedgers.aspx.cs @@ -19,6 +19,8 @@ public partial class Pages_v5_Ledgers_DebugLedgers : PageV5Base // TODO: If this O(n^2) matching becomes teh suckage, optimize using hashtables over amounts + Payouts.AutomatchAgainstUnbalancedTransactions(this.CurrentOrganization); + // Iterate over all open payment groups and try to map them to unbalanced transactions FinancialTransactions unbalancedTransactions = FinancialTransactions.GetUnbalanced(this.CurrentOrganization); // TODO: this fn should move to Organization diff --git a/Utility/Communications/CommsTransmitterMail.cs b/Utility/Communications/CommsTransmitterMail.cs index d1b533e6..414b681b 100644 --- a/Utility/Communications/CommsTransmitterMail.cs +++ b/Utility/Communications/CommsTransmitterMail.cs @@ -54,6 +54,7 @@ namespace Swarmops.Utility.Communications if (string.IsNullOrEmpty(smtpServer)) { smtpServer = "192.168.80.204"; // For development use only - invalidate cache instead of this, forcing re-reload + _cacheReloadTime = DateTime.MinValue; } SmtpClient mailClient = new SmtpClient(smtpServer);