mirror of
https://github.com/google/nomulus
synced 2026-01-09 07:33:42 +00:00
Remove obsolete TransferData.extendedRegistrationYears
Now that transfers are always restricted to 1 year, it's unnecessary to store extendedRegistrationYears on TransferData - it will always be equal to 1. This simplifies logic in a few other places, e.g. RdeDomainImportAction. I verified in BigQuery that no DomainBases exist with extendedRegistrationYears values that aren't either null or equal to 1. At some point we should remove the persisted fields from datastore via e.g. resaving all those domains, but it's low priority and can wait until we have some more pressing migration. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=150373897
This commit is contained in:
@@ -96,15 +96,14 @@ public final class ResourceFlowUtils {
|
||||
builder = new ContactTransferResponse.Builder().setContactId(eppResource.getForeignKey());
|
||||
} else {
|
||||
DomainResource domain = (DomainResource) eppResource;
|
||||
builder = new DomainTransferResponse.Builder()
|
||||
.setFullyQualifiedDomainNameName(eppResource.getForeignKey())
|
||||
.setExtendedRegistrationExpirationTime(
|
||||
ADD_EXDATE_STATUSES.contains(transferData.getTransferStatus())
|
||||
? extendRegistrationWithCap(
|
||||
now,
|
||||
domain.getRegistrationExpirationTime(),
|
||||
transferData.getExtendedRegistrationYears())
|
||||
: null);
|
||||
builder =
|
||||
new DomainTransferResponse.Builder()
|
||||
.setFullyQualifiedDomainNameName(eppResource.getForeignKey())
|
||||
// TODO(b/25084229): fix exDate computation logic.
|
||||
.setExtendedRegistrationExpirationTime(
|
||||
ADD_EXDATE_STATUSES.contains(transferData.getTransferStatus())
|
||||
? extendRegistrationWithCap(now, domain.getRegistrationExpirationTime(), 1)
|
||||
: null);
|
||||
}
|
||||
builder.setGainingClientId(transferData.getGainingClientId())
|
||||
.setLosingClientId(transferData.getLosingClientId())
|
||||
@@ -218,7 +217,6 @@ public final class ResourceFlowUtils {
|
||||
TransferData oldTransferData, TransferStatus transferStatus, DateTime now) {
|
||||
checkArgument(!oldTransferData.equals(TransferData.EMPTY), "No old transfer to resolve.");
|
||||
return oldTransferData.asBuilder()
|
||||
.setExtendedRegistrationYears(null)
|
||||
.setServerApproveEntities(null)
|
||||
.setServerApproveBillingEvent(null)
|
||||
.setServerApproveAutorenewEvent(null)
|
||||
|
||||
Reference in New Issue
Block a user