Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
Fix #332 - issue 3
support75dfb41ce614
diff --git a/src/Web/Grand.Web/Commands/Handler/Common/ContactUsSendCommandHandler.cs b/src/Web/Grand.Web/Commands/Handler/Common/ContactUsSendCommandHandler.csindex 0cdeebf3c..63f0146d5 100644--- a/src/Web/Grand.Web/Commands/Handler/Common/ContactUsSendCommandHandler.cs+++ b/src/Web/Grand.Web/Commands/Handler/Common/ContactUsSendCommandHandler.cs@@ -327,7 +327,7 @@ namespace Grand.Web.Commands.Handler.Commoncase AttributeControlType.ColorSquares:case AttributeControlType.ImageSquares:{- if (selectedContactAttributes != null || selectedContactAttributes.Any())+ if (selectedContactAttributes != null && selectedContactAttributes.Any()){//clear default selectionforeach (var item in attributeModel.Values)@@ -352,7 +352,7 @@ namespace Grand.Web.Commands.Handler.Commoncase AttributeControlType.TextBox:case AttributeControlType.MultilineTextbox:{- if (selectedContactAttributes != null || selectedContactAttributes.Any())+ if (selectedContactAttributes != null && selectedContactAttributes.Any()){var enteredText = selectedContactAttributes.Where(x => x.Key == attribute.Id).Select(x => x.Value).ToList(); ;if (enteredText.Any())@@ -362,7 +362,7 @@ namespace Grand.Web.Commands.Handler.Commonbreak;case AttributeControlType.Datepicker:{- if (selectedContactAttributes != null || selectedContactAttributes.Any())+ if (selectedContactAttributes != null && selectedContactAttributes.Any()){//keep in mind my that the code below works only in the current culturevar selectedDateStr = selectedContactAttributes.Where(x => x.Key == attribute.Id).Select(x => x.Value).ToList();@@ -383,7 +383,7 @@ namespace Grand.Web.Commands.Handler.Commonbreak;case AttributeControlType.FileUpload:{- if (selectedContactAttributes != null || selectedContactAttributes.Any())+ if (selectedContactAttributes != null && selectedContactAttributes.Any()){var downloadGuidStr = selectedContactAttributes.Where(x => x.Key == attribute.Id).Select(x => x.Value).FirstOrDefault();Guid.TryParse(downloadGuidStr, out Guid downloadGuid);