From ae1ff37e72c6897cbd7fa1c30954526804675b77 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 10 Apr 2017 20:02:26 -0400 Subject: [PATCH] update billing only if something changes --- src/Api/Controllers/OrganizationsController.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Api/Controllers/OrganizationsController.cs b/src/Api/Controllers/OrganizationsController.cs index 2aaef33096..026d0d4a66 100644 --- a/src/Api/Controllers/OrganizationsController.cs +++ b/src/Api/Controllers/OrganizationsController.cs @@ -111,7 +111,10 @@ namespace Bit.Api.Controllers throw new NotFoundException(); } - await _organizationService.UpdateAsync(model.ToOrganization(organization), true); + var updatebilling = model.BusinessName != organization.BusinessName || + model.BillingEmail != organization.BillingEmail; + + await _organizationService.UpdateAsync(model.ToOrganization(organization), updatebilling); return new OrganizationResponseModel(organization); }