diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs index ba7589293..0028813e0 100644 --- a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs +++ b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs @@ -203,7 +203,7 @@ public class CatalogContextSeed string catalogBrandName = column[Array.IndexOf(headers, "catalogbrandname")].Trim('"').Trim(); if (!catalogBrandIdLookup.ContainsKey(catalogBrandName)) { - throw new Exception($"type={catalogTypeName} does not exist in catalogTypes"); + throw new Exception($"type={catalogBrandName} does not exist in catalogTypes"); } string priceString = column[Array.IndexOf(headers, "price")].Trim('"').Trim(); diff --git a/src/Services/Identity/Identity.API/Controllers/ConsentController.cs b/src/Services/Identity/Identity.API/Controllers/ConsentController.cs index 6ce04db57..76c27cd23 100644 --- a/src/Services/Identity/Identity.API/Controllers/ConsentController.cs +++ b/src/Services/Identity/Identity.API/Controllers/ConsentController.cs @@ -58,7 +58,7 @@ response = ConsentResponse.Denied; } // user clicked 'yes' - validate the data - else if (model.Button == "yes" && model != null) + else if (model.Button == "yes") { // if the user consented to some scope, build the response model if (model.ScopesConsented != null && model.ScopesConsented.Any()) diff --git a/src/Services/Identity/Identity.API/Services/ProfileService.cs b/src/Services/Identity/Identity.API/Services/ProfileService.cs index 0f0352ad1..6019b4bd8 100644 --- a/src/Services/Identity/Identity.API/Services/ProfileService.cs +++ b/src/Services/Identity/Identity.API/Services/ProfileService.cs @@ -13,7 +13,7 @@ { var subject = context.Subject ?? throw new ArgumentNullException(nameof(context.Subject)); - var subjectId = subject.Claims.Where(x => x.Type == "sub").FirstOrDefault().Value; + var subjectId = subject.Claims.Where(x => x.Type == "sub").FirstOrDefault()?.Value; var user = await _userManager.FindByIdAsync(subjectId); if (user == null) @@ -27,7 +27,7 @@ { var subject = context.Subject ?? throw new ArgumentNullException(nameof(context.Subject)); - var subjectId = subject.Claims.Where(x => x.Type == "sub").FirstOrDefault().Value; + var subjectId = subject.Claims.Where(x => x.Type == "sub").FirstOrDefault()?.Value; var user = await _userManager.FindByIdAsync(subjectId); context.IsActive = false; diff --git a/src/Services/Ordering/Ordering.API/Application/Commands/CreateOrderCommand.cs b/src/Services/Ordering/Ordering.API/Application/Commands/CreateOrderCommand.cs index 071f0657c..fb16306ee 100644 --- a/src/Services/Ordering/Ordering.API/Application/Commands/CreateOrderCommand.cs +++ b/src/Services/Ordering/Ordering.API/Application/Commands/CreateOrderCommand.cs @@ -79,7 +79,6 @@ public class CreateOrderCommand CardExpiration = cardExpiration; CardSecurityNumber = cardSecurityNumber; CardTypeId = cardTypeId; - CardExpiration = cardExpiration; }