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:
cgoldfeder 2017-01-31 11:50:39 -08:00 committed by Ben McIlwain
parent e15f75854f
commit ddffbb0b61
2 changed files with 2 additions and 6 deletions

View file

@ -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);
}