From 57255e0aec5388bd6db23f24fc7f86c043a3d1e7 Mon Sep 17 00:00:00 2001 From: Robert McRackan Date: Thu, 23 Jun 2022 07:53:12 -0400 Subject: [PATCH] comments --- Source/DtoImporterService/BookImporter.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/DtoImporterService/BookImporter.cs b/Source/DtoImporterService/BookImporter.cs index 297ae659..67d18f4e 100644 --- a/Source/DtoImporterService/BookImporter.cs +++ b/Source/DtoImporterService/BookImporter.cs @@ -101,7 +101,8 @@ namespace DtoImporterService // absence of categories is also possible // CATEGORY HACK: only use the 1st 2 categories - // (real impl: var lastCategory = item.Categories.LastOrDefault()?.CategoryId ?? "";) + // after we support full arbitrary-depth category trees and multiple categories per book, the real impl will be something like this + // var lastCategory = item.Categories.LastOrDefault()?.CategoryId ?? ""; var lastCategory = item.Categories.Length == 0 ? "" : item.Categories.Length == 1 ? item.Categories[0].CategoryId