fix import with domain setup dns verification (#98)
Co-authored-by: Michael Hoennig <michael@hoennig.de> Reviewed-on: https://dev.hostsharing.net/hostsharing/hs.hsadmin.ng/pulls/98 Reviewed-by: Marc Sandlus <marc.sandlus@hostsharing.net>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user