fix(assets): safeguard against null InstrumentCategory during ETF/Fund scans

This commit is contained in:
2026-09-01 17:38:46 +02:00
parent d161efb370
commit 2fe8cc0dca
2 changed files with 22 additions and 7 deletions
@@ -27,7 +27,13 @@ public record TradeRepublicAsset
[JsonPropertyName("isin")] public string Isin { get; init; } = "";
[JsonPropertyName("name")] public string Name { get; init; } = "";
[JsonPropertyName("type")] public string Type { get; init; } = "";
[JsonPropertyName("instrumentCategory")] public string InstrumentCategory { get; init; } = "";
private readonly string _instrumentCategory = "";
[JsonPropertyName("instrumentCategory")]
public string InstrumentCategory
{
get => _instrumentCategory;
init => _instrumentCategory = value ?? "";
}
[JsonPropertyName("hasCfd")] public bool HasCfd { get; init; }
[JsonPropertyName("imageId")] public string? ImageId { get; init; }