diff --git a/AdminUI/LearningHub.Nhs.AdminUI/Controllers/CatalogueController.cs b/AdminUI/LearningHub.Nhs.AdminUI/Controllers/CatalogueController.cs index b9f1b5e0..49aef963 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/Controllers/CatalogueController.cs +++ b/AdminUI/LearningHub.Nhs.AdminUI/Controllers/CatalogueController.cs @@ -740,6 +740,7 @@ public async Task AddCategoryToCatalogue(CatalogueViewModel catal this.ModelState.AddModelError("SelectedCategoryId", "Please select a category."); var vm = await this.catalogueService.GetCatalogueAsync(catalogueViewModel.CatalogueNodeVersionId); var categories = await this.moodleBridgeApiService.GetAllMoodleCategoriesAsync(); + vm.SelectedCategoryId = null; vm.MoodleCategorySelectList = BuildMoodleCategorySelectList(categories); return this.View("MoodleCategory", vm); diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/MoodleBridgeApiService.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/MoodleBridgeApiService.cs index 80dd7617..71076c3f 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/MoodleBridgeApiService.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/MoodleBridgeApiService.cs @@ -215,8 +215,7 @@ public async Task GetRecentEnrolledCoursesAsy } catch (Exception ex) { - this.logger.LogError(ex, "An error occurred while fetching user's recent learning activities "); - throw; + return null; } }