Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v 0.14.7 #224

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/iRLeagueApiCore.Client/iRLeagueApiCore.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<OutputType>Library</OutputType>
<TargetFrameworks>net8.0</TargetFrameworks>
<PackageId>iRLeagueApiCore.Client</PackageId>
<Version>0.14.6</Version>
<Version>0.14.7</Version>
<Authors>Simon Schulze</Authors>
<Company>Simon Schulze</Company>
<PackageDescription>This package contains shared objects for all members of the iRLeagueDatabase-iRLeagueApi stack</PackageDescription>
Expand Down
2 changes: 1 addition & 1 deletion src/iRLeagueApiCore.Common/iRLeagueApiCore.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<OutputType>Library</OutputType>
<TargetFramework>net8.0</TargetFramework>
<PackageId>iRLeagueApiCore.Common</PackageId>
<Version>0.14.6</Version>
<Version>0.14.7</Version>
<Authors>Simon Schulze</Authors>
<Company>Simon Schulze</Company>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
2 changes: 1 addition & 1 deletion src/iRLeagueApiCore.Server/iRLeagueApiCore.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Version>0.14.6</Version>
<Version>0.14.7</Version>
<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ public override Task<StandingCalculationResult> Calculate(StandingCalculationDat
.OrderBy(GetDropweekOverrideOrderValue);
var currentResult = currentMemberResult.GetValueOrDefault(memberId);
var standingRow = new StandingRowCalculationResult();
var lastResult = currentResult ?? previousEventResults.FirstOrDefault();
var lastResult = currentResult ?? previousEventResults
.OrderBy(x => x.EventResult.Date)
.LastOrDefault();
var lastRow = lastResult?.SessionResults.LastOrDefault()?.ResultRow;
if (lastRow is null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ private static bool LapIsValid(TimeSpan lap)
{
LeagueId = eventResult.LeagueId,
EventId = eventResult.EventId,
Date = eventResult.Event.Date,
SessionResults = eventResult.SessionResults
.OrderBy(sessionResult => sessionResult.Session.SessionNr)
.Select(sessionResult => new SessionCalculationData()
Expand Down Expand Up @@ -229,6 +230,7 @@ private static bool LapIsValid(TimeSpan lap)
{
LeagueId = eventResult.LeagueId,
EventId = eventResult.EventId,
Date = eventResult.Event.Date,
SessionResults = eventResult.ScoredSessionResults
.OrderBy(sessionResult => sessionResult.SessionNr)
.Select(sessionResult => new SessionCalculationData()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ private async Task<IEnumerable<EventCalculationResult>> GetPreviousResultsAsync(
{
LeagueId = eventResult.LeagueId,
EventId = eventResult.EventId,
Date = eventResult.Event.Date,
Name = eventResult.Name,
ResultConfigId = eventResult.ResultConfigId,
ResultId = eventResult.ResultId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ internal sealed class EventCalculationData
{
public long LeagueId { get; set; }
public long EventId { get; set; }
public DateTime? Date { get; set; }
public IEnumerable<AddPenaltyCalculationData> AddPenalties { get; set; } = Array.Empty<AddPenaltyCalculationData>();
public IEnumerable<SessionCalculationData> SessionResults { get; set; } = Array.Empty<SessionCalculationData>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ public EventCalculationResult(EventCalculationData data)
{
LeagueId = data.LeagueId;
EventId = data.EventId;
Date = data.Date;
}

public long LeagueId { get; set; }
public long EventId { get; set; }
public DateTime? Date { get; set; }
public long? ResultId { get; set; }
public long? ChampSeasonId { get; set; }
public long? ResultConfigId { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/iRLeagueDatabaseCore/iRLeagueDatabaseCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<TargetFramework>net8.0</TargetFramework>
<LangVersion>12</LangVersion>
<PackageId>iRLeagueDatabaseCore</PackageId>
<Version>0.14.6</Version>
<Version>0.14.7</Version>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

Expand Down
Loading