fix import with domain setup dns verification
This commit is contained in:
parent
a7d586f0f7
commit
72d0ae85e5
@ -26,9 +26,11 @@ class HsDomainSetupHostingAssetValidator extends HostingAssetEntityValidator {
|
||||
|
||||
@Override
|
||||
public List<String> validateEntity(final HsHostingAsset assetEntity) {
|
||||
final var violations = // new ArrayList<String>();
|
||||
super.validateEntity(assetEntity);
|
||||
if (!violations.isEmpty()) {
|
||||
final var violations = super.validateEntity(assetEntity);
|
||||
if (!violations.isEmpty() || assetEntity.isLoaded()) {
|
||||
// it makes no sense to do DNS-based validation
|
||||
// if the entity is already persisted or
|
||||
// if the identifier (domain name) or structure is already invalid
|
||||
return violations;
|
||||
}
|
||||
|
||||
|
@ -1450,6 +1450,7 @@ public class ImportHostingAssets extends BaseOfficeDataImport {
|
||||
// nothing here
|
||||
))
|
||||
.build();
|
||||
domainSetupAsset.markAsLoaded(); // to skip setup verification
|
||||
domainSetupsByName.put(domain_name, domainSetupAsset);
|
||||
domainSetupAssets.put(domain_id, domainSetupAsset);
|
||||
domainSetupAsset.setSubHostingAssets(new ArrayList<>());
|
||||
|
Loading…
Reference in New Issue
Block a user