diff --git a/services/merchant-service-net/src/MerchantService.API/Application/Queries/Shops/GetShopsQueryHandler.cs b/services/merchant-service-net/src/MerchantService.API/Application/Queries/Shops/GetShopsQueryHandler.cs index 5fa1e7fb..300d02f0 100644 --- a/services/merchant-service-net/src/MerchantService.API/Application/Queries/Shops/GetShopsQueryHandler.cs +++ b/services/merchant-service-net/src/MerchantService.API/Application/Queries/Shops/GetShopsQueryHandler.cs @@ -88,30 +88,30 @@ public class GetShopByIdQueryHandler : IRequestHandler d.ToString()).ToList() + OpenDays = shop.OperatingHours.OpenDays?.Select(d => d.ToString()).ToList() ?? new() } : null, - Branches = shop.Branches.Select(b => new ShopBranchDto + Branches = shop.Branches?.Select(b => new ShopBranchDto { Id = b.Id, Name = b.Name, Code = b.Code, - Address = new AddressDto + Address = b.Address != null ? new AddressDto { Street = b.Address.Street, Ward = b.Address.Ward, @@ -119,7 +119,7 @@ public class GetShopByIdQueryHandler : IRequestHandler