null description causes errors
This commit is contained in:
parent
db84c9a7d9
commit
d2ff19e309
@ -99,8 +99,8 @@ namespace DataLayer
|
|||||||
Category = category;
|
Category = category;
|
||||||
|
|
||||||
// simple assigns
|
// simple assigns
|
||||||
Title = title.Trim();
|
Title = title.Trim() ?? "";
|
||||||
Description = description?.Trim();
|
Description = description?.Trim() ?? "";
|
||||||
LengthInMinutes = lengthInMinutes;
|
LengthInMinutes = lengthInMinutes;
|
||||||
ContentType = contentType;
|
ContentType = contentType;
|
||||||
|
|
||||||
|
|||||||
@ -252,7 +252,7 @@ namespace LibationWinForms
|
|||||||
private static string GetDescriptionDisplay(Book book)
|
private static string GetDescriptionDisplay(Book book)
|
||||||
{
|
{
|
||||||
var doc = new HtmlAgilityPack.HtmlDocument();
|
var doc = new HtmlAgilityPack.HtmlDocument();
|
||||||
doc.LoadHtml(book.Description);
|
doc.LoadHtml(book?.Description ?? "");
|
||||||
var noHtml = doc.DocumentNode.InnerText;
|
var noHtml = doc.DocumentNode.InnerText;
|
||||||
return
|
return
|
||||||
noHtml.Length < 63 ?
|
noHtml.Length < 63 ?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user