mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Do not cancel pending transfers unless there is one to cancel
A previous CL inadvertently caused the system to always set the transfer status to SERVER_CANCELLED when deleting a resource, even if there was no transfer. This led to RDE problems. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=140890919
This commit is contained in:
parent
7cf29366bc
commit
c0d9b54872
5 changed files with 37 additions and 7 deletions
|
@ -131,9 +131,10 @@ public final class DomainDeleteFlow implements TransactionalFlow {
|
|||
AfterValidationParameters.newBuilder().setExistingDomain(existingDomain).build());
|
||||
ImmutableSet.Builder<ImmutableObject> entitiesToSave = new ImmutableSet.Builder<>();
|
||||
HistoryEntry historyEntry = buildHistoryEntry(existingDomain, now);
|
||||
Builder builder =
|
||||
ResourceFlowUtils.<DomainResource, DomainResource.Builder>resolvePendingTransfer(
|
||||
existingDomain, TransferStatus.SERVER_CANCELLED, now);
|
||||
Builder builder = existingDomain.getStatusValues().contains(StatusValue.PENDING_TRANSFER)
|
||||
? ResourceFlowUtils.<DomainResource, DomainResource.Builder>resolvePendingTransfer(
|
||||
existingDomain, TransferStatus.SERVER_CANCELLED, now)
|
||||
: existingDomain.asBuilder();
|
||||
builder.setDeletionTime(now).setStatusValues(null);
|
||||
// If the domain is in the Add Grace Period, we delete it immediately, which is already
|
||||
// reflected in the builder we just prepared. Otherwise we give it a PENDING_DELETE status.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue