mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Improve the error when trying to delete the registrant contact
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=196708902
This commit is contained in:
parent
25d03f239c
commit
e4f25c08e8
5 changed files with 55 additions and 1 deletions
|
@ -27,6 +27,7 @@ import static google.registry.util.CollectionUtils.nullToEmptyImmutableCopy;
|
|||
import static google.registry.util.CollectionUtils.union;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.googlecode.objectify.Key;
|
||||
|
@ -387,7 +388,7 @@ public class DomainCommand {
|
|||
/** Creates a copy of this {@link Change} with hard links to hosts and contacts. */
|
||||
Change cloneAndLinkReferences(DateTime now) throws InvalidReferencesException {
|
||||
Change clone = clone(this);
|
||||
clone.registrant = clone.registrantContactId == null
|
||||
clone.registrant = Strings.isNullOrEmpty(clone.registrantContactId)
|
||||
? null
|
||||
: getOnlyElement(
|
||||
loadByForeignKeys(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue