From 8a9e3a92d0a1666d7c5a90783fdcc380fb393593 Mon Sep 17 00:00:00 2001 From: Konstantin Savosteev Date: Wed, 28 Aug 2024 12:11:44 +0200 Subject: [PATCH] fix: possible NRE --- .../Commands/CreateQuoteCommandHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VirtoCommerce.QuoteModule.ExperienceApi/Commands/CreateQuoteCommandHandler.cs b/src/VirtoCommerce.QuoteModule.ExperienceApi/Commands/CreateQuoteCommandHandler.cs index d72a58fe..b0af0687 100644 --- a/src/VirtoCommerce.QuoteModule.ExperienceApi/Commands/CreateQuoteCommandHandler.cs +++ b/src/VirtoCommerce.QuoteModule.ExperienceApi/Commands/CreateQuoteCommandHandler.cs @@ -49,7 +49,7 @@ public async Task Handle(CreateQuoteCommand request, Cancellatio var contact = await GetContact(request.UserId); quote.CustomerName = contact?.Name; - quote.OrganizationId = request.CurrentOrganizationId ?? contact.DefaultOrganizationId; + quote.OrganizationId = request.CurrentOrganizationId ?? contact?.DefaultOrganizationId; var organization = await GetOrganization(quote.OrganizationId); quote.OrganizationName = organization?.Name;