mirror of
https://github.com/bitwarden/server.git
synced 2025-05-20 11:04:31 -05:00
resolve the issue with error page after cancel (#4193)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
This commit is contained in:
parent
9595252224
commit
de56461b97
@ -13,6 +13,7 @@ using Bit.Core.Settings;
|
||||
using Bit.Core.Utilities;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using TaxRate = Bit.Core.Entities.TaxRate;
|
||||
|
||||
namespace Bit.Admin.Controllers;
|
||||
|
||||
@ -518,8 +519,17 @@ public class ToolsController : Controller
|
||||
{
|
||||
model.Filter.StartingAfter = null;
|
||||
}
|
||||
|
||||
if (model.Action == StripeSubscriptionsAction.NextPage || model.Action == StripeSubscriptionsAction.Search)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(model.Filter.StartingAfter))
|
||||
{
|
||||
var subscription = await _stripeAdapter.SubscriptionGetAsync(model.Filter.StartingAfter);
|
||||
if (subscription.Status == "canceled")
|
||||
{
|
||||
model.Filter.StartingAfter = null;
|
||||
}
|
||||
}
|
||||
model.Filter.EndingBefore = null;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user