From e0cb4e465c9e09b341ca86e0e9f51386346bc197 Mon Sep 17 00:00:00 2001 From: ctingue Date: Tue, 14 Feb 2017 08:39:00 -0800 Subject: [PATCH] Fix resource mismatch problem in FixDomainNameserverKeysCommand ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=147476075 --- .../tools/javascrap/FixDomainNameserverKeysCommand.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java/google/registry/tools/javascrap/FixDomainNameserverKeysCommand.java b/java/google/registry/tools/javascrap/FixDomainNameserverKeysCommand.java index c548e771a..dad6599ac 100644 --- a/java/google/registry/tools/javascrap/FixDomainNameserverKeysCommand.java +++ b/java/google/registry/tools/javascrap/FixDomainNameserverKeysCommand.java @@ -115,7 +115,10 @@ public class FixDomainNameserverKeysCommand extends ConfirmingCommand implements for (Entry entry : domainUpdates.entrySet()) { DomainResource existingDomain = entry.getKey(); checkState( - Objects.equals(existingDomain, ofy().load().entity(existingDomain).now()), + Objects.equals( + existingDomain, + ofy().load().entity(existingDomain).now() + .cloneProjectedAtTime(ofy().getTransactionTime())), "Domain %s changed since init() was called.", existingDomain.getFullyQualifiedDomainName()); HistoryEntry historyEntryWithModificationTime =