From c077b9900f30d1378d35de25c5d7bfcebfbb5920 Mon Sep 17 00:00:00 2001 From: swapnamol-abraham Date: Mon, 3 Nov 2025 12:50:53 +0000 Subject: [PATCH] Corrected the Catalogue Id --- LearningHub.Nhs.WebUI/Controllers/CatalogueController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LearningHub.Nhs.WebUI/Controllers/CatalogueController.cs b/LearningHub.Nhs.WebUI/Controllers/CatalogueController.cs index 0825b7a9..c8cb93f4 100644 --- a/LearningHub.Nhs.WebUI/Controllers/CatalogueController.cs +++ b/LearningHub.Nhs.WebUI/Controllers/CatalogueController.cs @@ -212,7 +212,7 @@ public async Task IndexAsync(string reference, string tab, int? n this.ViewBag.ActiveTab = tab; var catalogue = await this.catalogueService.GetCatalogueAsync(reference); - var catalogueCategoryId = await this.categoryService.GetCatalogueVersionCategoryAsync(catalogue.NodeVersionId); + var catalogueCategoryId = await this.categoryService.GetCatalogueVersionCategoryAsync(catalogue.Id); catalogue.SelectedCategoryId = catalogueCategoryId; if (catalogue == null) { @@ -304,7 +304,7 @@ public async Task IndexAsync(string reference, string tab, int? n } else if (tab == "courses") { - int categoryId = moodleCategoryId ?? await this.categoryService.GetCatalogueVersionCategoryAsync(catalogue.NodeVersionId); + int categoryId = moodleCategoryId ?? await this.categoryService.GetCatalogueVersionCategoryAsync(catalogue.Id); var response = await this.categoryService.GetCoursesByCategoryIdAsync(categoryId); viewModel.Courses = response.Courses;