mirror of
https://github.com/google/nomulus
synced 2026-08-28 03:46:30 +00:00
Fix bug which allowed creation of hosts with superordinate domains in pending delete state.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=154716883
This commit is contained in:
@@ -28,6 +28,7 @@ import com.googlecode.objectify.VoidWork;
|
||||
import google.registry.config.RegistryConfig.Config;
|
||||
import google.registry.mapreduce.MapreduceRunner;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.eppcommon.StatusValue;
|
||||
import google.registry.model.host.HostResource;
|
||||
import google.registry.request.Action;
|
||||
import google.registry.request.Parameter;
|
||||
@@ -107,6 +108,14 @@ public class RdeHostLinkAction implements Runnable {
|
||||
logger.infofmt("Host %s is out of zone", xjcHost.getName());
|
||||
return;
|
||||
}
|
||||
if (superordinateDomain.get().getStatusValues().contains(StatusValue.PENDING_DELETE)) {
|
||||
getContext()
|
||||
.incrementCounter(
|
||||
"post-import hosts with superordinate domains in pending delete");
|
||||
logger.infofmt(
|
||||
"Host %s has a superordinate domain in pending delete", xjcHost.getName());
|
||||
return;
|
||||
}
|
||||
// at this point, the host is definitely in zone and should be linked
|
||||
getContext().incrementCounter("post-import hosts in zone");
|
||||
final Key<DomainResource> superordinateDomainKey = Key.create(superordinateDomain.get());
|
||||
|
||||
Reference in New Issue
Block a user