diff --git a/java/google/registry/flows/host/HostUpdateFlow.java b/java/google/registry/flows/host/HostUpdateFlow.java index 857bd09f5..df838c956 100644 --- a/java/google/registry/flows/host/HostUpdateFlow.java +++ b/java/google/registry/flows/host/HostUpdateFlow.java @@ -155,7 +155,7 @@ public final class HostUpdateFlow implements TransactionalFlow { // the lookupSuperordinateDomain(...) call above, so that it will never be stale. .setSuperordinateDomain( superordinateDomain.isPresent() ? Key.create(superordinateDomain.get()) : null) - .setLastSuperordinateChange(superordinateDomain == null ? null : now) + .setLastSuperordinateChange(superordinateDomain.isPresent() ? now : null) .build() // Rely on the host's cloneProjectedAtTime() method to handle setting of transfer data. .cloneProjectedAtTime(now); diff --git a/javatests/google/registry/flows/host/HostUpdateFlowTest.java b/javatests/google/registry/flows/host/HostUpdateFlowTest.java index 0e6c412db..0264328ca 100644 --- a/javatests/google/registry/flows/host/HostUpdateFlowTest.java +++ b/javatests/google/registry/flows/host/HostUpdateFlowTest.java @@ -562,6 +562,8 @@ public class HostUpdateFlowTest extends ResourceFlowTestCase