diff --git a/octodns/record/__init__.py b/octodns/record/__init__.py index f24a89e..a498fb7 100644 --- a/octodns/record/__init__.py +++ b/octodns/record/__init__.py @@ -566,14 +566,6 @@ class _DynamicMixin(object): reasons.append(f'invalid weight "{weight}" in ' f'pool "{_id}" value {value_num}') - try: - value = value['value'] - reasons.extend(cls._value_type.validate(value, - cls._type)) - except KeyError: - reasons.append(f'missing value in pool "{_id}" ' - f'value {value_num}') - try: status = value['status'] if status not in ['up', 'down', 'obey']: @@ -582,6 +574,14 @@ class _DynamicMixin(object): except KeyError: pass + try: + value = value['value'] + reasons.extend(cls._value_type.validate(value, + cls._type)) + except KeyError: + reasons.append(f'missing value in pool "{_id}" ' + f'value {value_num}') + if len(values) == 1 and values[0].get('weight', 1) != 1: reasons.append(f'pool "{_id}" has single value with ' 'weight!=1')