diff --git a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs index b3176c1bec..3bdf62f412 100644 --- a/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs +++ b/DigitalLearningSolutions.Data/DataServices/FrameworkDataService.cs @@ -2435,7 +2435,7 @@ Competencies AS c INNER JOIN CompetencyGroups AS cg ON fcg.CompetencyGroupID = cg.ID WHERE (fc.FrameworkID = @frameworkId) GROUP BY fc.ID, c.ID, cg.Name, cg.Description, c.Name, c.Description, c.AlwaysShowDescription, fcg.Ordering, fc.Ordering - ORDER BY COALESCE(fcg.Ordering,99999), fc.Ordering", + ORDER BY COALESCE(fcg.Ordering,99999), fc.Ordering, fc.ID", new { frameworkId } ); } @@ -2448,7 +2448,7 @@ public List GetFrameworkCompetencyOrder(int frameworkId, List framewor FROM FrameworkCompetencies AS fc LEFT JOIN FrameworkCompetencyGroups AS fcg ON fc.FrameworkCompetencyGroupID = fcg.ID WHERE (fc.FrameworkID = @frameworkId) AND (fc.ID IN @frameworkCompetencyIds) - ORDER BY COALESCE(fcg.Ordering,99999), fc.Ordering", + ORDER BY COALESCE(fcg.Ordering,99999), fc.Ordering, fc.ID", new { frameworkId, frameworkCompetencyIds } ).ToList(); }