Skip to content

Commit 120c5dd

Browse files
author
Auldrin Possa
committed
TD-5451- Empty competency description check added
1 parent ff91492 commit 120c5dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

DigitalLearningSolutions.Web/Views/LearningPortal/SelfAssessments/_OverviewTable.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
model="competency.CompetencyFlags" />
5050
</div>
5151
<div class="nhsuk-grid-column-full">
52-
@if (competency.Description != null && !competency.AlwaysShowDescription)
52+
@if (!string.IsNullOrWhiteSpace(competency.Description) && !competency.AlwaysShowDescription)
5353
{
5454
<details class="nhsuk-details">
5555
<summary class="nhsuk-details__summary nhsuk-u-padding-0">
@@ -64,10 +64,10 @@
6464
}
6565
else
6666
{
67-
<p class="@(competency.Description != null ? "nhsuk-u-font-weight-bold" : "") nhsuk-u-margin-bottom-0">
67+
<p class="@(!string.IsNullOrWhiteSpace(competency.Description) ? "nhsuk-u-font-weight-bold" : "") nhsuk-u-margin-bottom-0">
6868
@competency.Name
6969
</p>
70-
@if (competency.Description != null)
70+
@if (!string.IsNullOrWhiteSpace(competency.Description))
7171
{
7272
<p class="nhsuk-u-margin-top-2">
7373
@(Html.Raw(competency.Description))

0 commit comments

Comments
 (0)