Skip to content

Commit

Permalink
[AC-1772] Check null or whitespace on GatewayCustomerId and `Billin…
Browse files Browse the repository at this point in the history
…gEmail` (#3398)

* Check null or whitespace on GatewayCustomerId and BillingEmail

* Fixed expiration input
  • Loading branch information
amorask-bitwarden authored Nov 2, 2023
1 parent abc7b35 commit cfe9812
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Admin/Controllers/OrganizationsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,10 @@ public async Task<IActionResult> Edit(Guid id, OrganizationEditModel model)

try
{
await _stripeSyncService.UpdateCustomerEmailAddress(organization.GatewayCustomerId, organization.BillingEmail);
if (!string.IsNullOrWhiteSpace(organization.GatewayCustomerId) && !string.IsNullOrWhiteSpace(organization.BillingEmail))
{
await _stripeSyncService.UpdateCustomerEmailAddress(organization.GatewayCustomerId, organization.BillingEmail);
}
}
catch (StripeException stripeException)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Admin/Views/Shared/_OrganizationForm.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
<div class="col-sm">
<div class="form-group">
<label asp-for="ExpirationDate"></label>
<input type="datetime-local" class="form-control" asp-for="ExpirationDate" readonly='@(!canEditLicensing)'>
<input type="datetime-local" class="form-control" asp-for="ExpirationDate" readonly='@(!canEditLicensing)' step="1">
</div>
</div>
</div>
Expand Down

0 comments on commit cfe9812

Please sign in to comment.