Fix resource mismatch problem in FixDomainNameserverKeysCommand

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=147476075
This commit is contained in:
ctingue 2017-02-14 08:39:00 -08:00 committed by Ben McIlwain
parent 07625ce81b
commit e0cb4e465c

View file

@ -115,7 +115,10 @@ public class FixDomainNameserverKeysCommand extends ConfirmingCommand implements
for (Entry<DomainResource, DomainResource> 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 =