diff --git a/Core/Calculation/EventAssigner.cs b/Core/Calculation/EventAssigner.cs index e266ac3..191c8a2 100644 --- a/Core/Calculation/EventAssigner.cs +++ b/Core/Calculation/EventAssigner.cs @@ -29,6 +29,7 @@ namespace Core.Calculation _eventPickCounts = new int[_allEvents.Length]; _preAssigned = new List(); _droppedEvents = new List(); + _includedEvents = new List(); for (var i = 0; i < _events.Count; i++) { var e = _events[i]; diff --git a/Core/Parsers/AssignmentAssumptionParser.cs b/Core/Parsers/AssignmentAssumptionParser.cs index 79cb4f0..dc91728 100644 --- a/Core/Parsers/AssignmentAssumptionParser.cs +++ b/Core/Parsers/AssignmentAssumptionParser.cs @@ -17,7 +17,9 @@ public class AssignmentAssumptionParser : CsvParserBase var studentColumns = CsvReader.HeaderRecord.Select(h => h.Trim()).Where(h => !string.IsNullOrEmpty(h)).ToArray(); - var studentArray = studentColumns.Select(c => students.First(s => s.FirstName == c)).ToArray(); + var studentArray = + studentColumns + .Select(c => students.FirstOrDefault(s => s.FirstName == c)).ToArray(); while (CsvReader.Read()) { diff --git a/TSA Chapter Organizer.sln b/TSA Chapter Organizer.sln index 15e842b..867f50c 100644 --- a/TSA Chapter Organizer.sln +++ b/TSA Chapter Organizer.sln @@ -8,10 +8,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web", "Web\Web.csproj", "{855D693D-16FF-4C4A-AD3C-74A6B21ADB72}" EndProject -Project("{54A90642-561A-4BB1-A94E-469ADEE60C69}") = "app.client", "App\app.client\app.client.esproj", "{B5C2BB9C-648A-1696-315D-CC0E08D4256C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App.Server", "App\App.Server\App.Server.csproj", "{3548E169-4440-4259-8E0F-7210D12D7C40}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -30,16 +26,6 @@ Global {855D693D-16FF-4C4A-AD3C-74A6B21ADB72}.Debug|Any CPU.Build.0 = Debug|Any CPU {855D693D-16FF-4C4A-AD3C-74A6B21ADB72}.Release|Any CPU.ActiveCfg = Release|Any CPU {855D693D-16FF-4C4A-AD3C-74A6B21ADB72}.Release|Any CPU.Build.0 = Release|Any CPU - {B5C2BB9C-648A-1696-315D-CC0E08D4256C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B5C2BB9C-648A-1696-315D-CC0E08D4256C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B5C2BB9C-648A-1696-315D-CC0E08D4256C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {B5C2BB9C-648A-1696-315D-CC0E08D4256C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B5C2BB9C-648A-1696-315D-CC0E08D4256C}.Release|Any CPU.Build.0 = Release|Any CPU - {B5C2BB9C-648A-1696-315D-CC0E08D4256C}.Release|Any CPU.Deploy.0 = Release|Any CPU - {3548E169-4440-4259-8E0F-7210D12D7C40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3548E169-4440-4259-8E0F-7210D12D7C40}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3548E169-4440-4259-8E0F-7210D12D7C40}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3548E169-4440-4259-8E0F-7210D12D7C40}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Tests/Parsers/AssignmentAssumption_Tests.cs b/Tests/Parsers/AssignmentAssumption_Tests.cs index 1400df4..9891c5a 100644 --- a/Tests/Parsers/AssignmentAssumption_Tests.cs +++ b/Tests/Parsers/AssignmentAssumption_Tests.cs @@ -10,7 +10,9 @@ public class AssignmentAssumption_Tests var eventAssumptions = TestEntityHandler.GetEventAssumptions(competitiveEvents, students); foreach (var ea in eventAssumptions) - { + { + if (ea.Student == null) + continue; Console.WriteLine($"{ea.Assumption,10} {ea.Event.ShortName, -20} {ea.Student.FirstName}"); }