mirror of
https://github.com/google/nomulus
synced 2025-12-23 14:25:44 +00:00
Remove unnecessary filter on LINKED
We already have an @OnLoad in EppResource that removes LINKED from any status values, so there's no reason to filter in info. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=146146501
This commit is contained in:
@@ -18,7 +18,6 @@ import static google.registry.flows.FlowUtils.validateClientIsLoggedIn;
|
||||
import static google.registry.flows.ResourceFlowUtils.loadAndVerifyExistence;
|
||||
import static google.registry.flows.ResourceFlowUtils.verifyOptionalAuthInfo;
|
||||
import static google.registry.model.EppResourceUtils.isLinked;
|
||||
import static google.registry.util.CollectionUtils.difference;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
@@ -67,8 +66,7 @@ public final class ContactInfoFlow implements Flow {
|
||||
boolean includeAuthInfo =
|
||||
clientId.equals(contact.getCurrentSponsorClientId()) || authInfo.isPresent();
|
||||
ImmutableSet.Builder<StatusValue> statusValues = new ImmutableSet.Builder<>();
|
||||
// TODO(b/34664935): When LINKED is no longer persisted we won't need to filter it out.
|
||||
statusValues.addAll(difference(contact.getStatusValues(), StatusValue.LINKED));
|
||||
statusValues.addAll(contact.getStatusValues());
|
||||
if (isLinked(Key.create(contact), now)) {
|
||||
statusValues.add(StatusValue.LINKED);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ import static google.registry.flows.FlowUtils.validateClientIsLoggedIn;
|
||||
import static google.registry.flows.ResourceFlowUtils.loadAndVerifyExistence;
|
||||
import static google.registry.flows.host.HostFlowUtils.validateHostName;
|
||||
import static google.registry.model.EppResourceUtils.isLinked;
|
||||
import static google.registry.util.CollectionUtils.difference;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.googlecode.objectify.Key;
|
||||
@@ -63,8 +62,7 @@ public final class HostInfoFlow implements Flow {
|
||||
DateTime now = clock.nowUtc();
|
||||
HostResource host = loadAndVerifyExistence(HostResource.class, targetId, now);
|
||||
ImmutableSet.Builder<StatusValue> statusValues = new ImmutableSet.Builder<>();
|
||||
// TODO(b/34664935): When LINKED is no longer persisted we won't need to filter it out.
|
||||
statusValues.addAll(difference(host.getStatusValues(), StatusValue.LINKED));
|
||||
statusValues.addAll(host.getStatusValues());
|
||||
if (isLinked(Key.create(host), now)) {
|
||||
statusValues.add(StatusValue.LINKED);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user