mirror of
https://github.com/bitwarden/server
synced 2025-12-17 08:43:27 +00:00
resolve the issue with error page after cancel (#4193)
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
This commit is contained in:
@@ -13,6 +13,7 @@ using Bit.Core.Settings;
|
|||||||
using Bit.Core.Utilities;
|
using Bit.Core.Utilities;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using TaxRate = Bit.Core.Entities.TaxRate;
|
||||||
|
|
||||||
namespace Bit.Admin.Controllers;
|
namespace Bit.Admin.Controllers;
|
||||||
|
|
||||||
@@ -518,8 +519,17 @@ public class ToolsController : Controller
|
|||||||
{
|
{
|
||||||
model.Filter.StartingAfter = null;
|
model.Filter.StartingAfter = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (model.Action == StripeSubscriptionsAction.NextPage || model.Action == StripeSubscriptionsAction.Search)
|
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;
|
model.Filter.EndingBefore = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user