mirror of
https://github.com/bitwarden/server.git
synced 2025-03-12 13:29:14 +01:00
Check to see if cancellation comment is populated before disablement checks (#5468)
This commit is contained in:
parent
fa90991270
commit
88ffde930f
@ -41,10 +41,15 @@ public class SubscriptionDeletedHandler : ISubscriptionDeletedHandler
|
||||
return;
|
||||
}
|
||||
|
||||
if (organizationId.HasValue &&
|
||||
subscription.CancellationDetails.Comment != providerMigrationCancellationComment &&
|
||||
!subscription.CancellationDetails.Comment.Contains(addedToProviderCancellationComment))
|
||||
if (organizationId.HasValue)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(subscription.CancellationDetails?.Comment) &&
|
||||
(subscription.CancellationDetails.Comment == providerMigrationCancellationComment ||
|
||||
subscription.CancellationDetails.Comment.Contains(addedToProviderCancellationComment)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
await _organizationDisableCommand.DisableAsync(organizationId.Value, subscription.CurrentPeriodEnd);
|
||||
}
|
||||
else if (userId.HasValue)
|
||||
|
Loading…
Reference in New Issue
Block a user