Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DigitalLearningSolutions.Data/Services/FrameworkService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ public int InsertCompetencyGroup(string groupName, string? groupDescription, int
);
return -2;
}
groupDescription = (groupDescription?.Trim() == "" ? null : groupDescription);
var existingId = (int)connection.ExecuteScalar(
@"SELECT COALESCE ((SELECT TOP(1)ID FROM CompetencyGroups WHERE [Name] = @groupName AND (@groupDescription IS NULL OR Description = @groupDescription)), 0) AS CompetencyGroupID",
new { groupName, groupDescription }
Expand Down Expand Up @@ -622,7 +623,7 @@ public int InsertCompetency(string name, string? description, int adminId)
);
return -2;
}

description = (description?.Trim() == "" ? null : description);
var existingId = 0;
if (description == null)
{
Expand Down