Skip to content

Commit

Permalink
fix for genericparser where there is no expectedasset(sub)class
Browse files Browse the repository at this point in the history
  • Loading branch information
VibeNL committed Dec 19, 2023
1 parent 268258f commit f0c4441
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GhostfolioSidekick/Ghostfolio/API/GhostfolioAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ static void AddToCache(string identifier, Model.SymbolProfile? asset, IMemoryCac
}

var filteredAsset = assets
.Where(x => expectedAssetClass?.Contains(x.AssetClass.GetValueOrDefault()) ?? false)
.Where(x => expectedAssetSubClass?.Contains(x.AssetSubClass.GetValueOrDefault()) ?? false)
.Where(x => expectedAssetClass?.Contains(x.AssetClass.GetValueOrDefault()) ?? true)
.Where(x => expectedAssetSubClass?.Contains(x.AssetSubClass.GetValueOrDefault()) ?? true)
.OrderBy(x => x.ISIN == identifier ? 0 : 1)
.ThenBy(x => x.Symbol == identifier ? 0 : 1)
.ThenBy(x => x.Name == identifier ? 0 : 1)
Expand Down

0 comments on commit f0c4441

Please sign in to comment.