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
Minor update - customer service
KrzysztofPajak7074ed3afd8e
diff --git a/src/Business/Grand.Business.Customers/Services/CustomerService.cs b/src/Business/Grand.Business.Customers/Services/CustomerService.csindex 93b8a3adb..59c99c294 100644--- a/src/Business/Grand.Business.Customers/Services/CustomerService.cs+++ b/src/Business/Grand.Business.Customers/Services/CustomerService.cs@@ -356,7 +356,7 @@ namespace Grand.Business.Customers.Servicesthrow new ArgumentNullException(nameof(customer));if (customer.IsSystemAccount)- throw new GrandException(string.Format("System customer account ({0}) could not be updated", customer.SystemName));+ throw new GrandException($"System customer account ({(string.IsNullOrEmpty(customer.SystemName) ? customer.Email : customer.SystemName)}) could not be updated");var update = UpdateBuilder<Customer>.Create().Set(x => x.Email, string.IsNullOrEmpty(customer.Email) ? "" : customer.Email.ToLowerInvariant())@@ -387,7 +387,7 @@ namespace Grand.Business.Customers.Servicesthrow new ArgumentNullException(nameof(customer));if (customer.IsSystemAccount)- throw new GrandException(string.Format("System customer account ({0}) could not be deleted", customer.SystemName));+ throw new GrandException($"System customer account ({(string.IsNullOrEmpty(customer.SystemName) ? customer.Email : customer.SystemName)}) could not be deleted");customer.Deleted = true;customer.Email = $"DELETED_@{DateTime.UtcNow.Ticks}.COM";@@ -440,7 +440,7 @@ namespace Grand.Business.Customers.Servicesthrow new ArgumentNullException(nameof(customer));if (customer.IsSystemAccount)- throw new GrandException(string.Format("System customer account ({0}) could not be updated", customer.SystemName));+ throw new GrandException($"System customer account ({(string.IsNullOrEmpty(customer.SystemName) ? customer.Email : customer.SystemName)}) could not be updated");var update = UpdateBuilder<Customer>.Create().Set(x => x.Active, customer.Active)