diff --git a/services/ordering/src/EShopOnAbp.OrderingService.Application/Orders/OrderAppService.cs b/services/ordering/src/EShopOnAbp.OrderingService.Application/Orders/OrderAppService.cs index 93bcc00c..0ac0dfd8 100644 --- a/services/ordering/src/EShopOnAbp.OrderingService.Application/Orders/OrderAppService.cs +++ b/services/ordering/src/EShopOnAbp.OrderingService.Application/Orders/OrderAppService.cs @@ -40,6 +40,11 @@ public class OrderAppService : ApplicationService, IOrderAppService [AllowAnonymous] public async Task> GetMyOrdersAsync(GetMyOrdersInput input) { + if (CurrentUser.Id == null) + { + return new List(); + } + ISpecification specification = SpecificationFactory.Create(input.Filter); var orders = await _orderRepository.GetOrdersByUserId(CurrentUser.GetId(), specification, true); return CreateOrderDtoMapping(orders);