1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

Simplify values -> value -> [] fallback code in _ValuesMixin

This commit is contained in:
Ross McFarland
2018-12-10 08:24:41 -08:00
parent a767a5cb25
commit 36b4a421c9

View File

@@ -254,13 +254,7 @@ class _ValuesMixin(object):
def validate(cls, name, data):
reasons = super(_ValuesMixin, cls).validate(name, data)
try:
values = data['values']
except KeyError:
try:
values = data['value']
except KeyError:
values = []
values = data.get('values', data.get('value', []))
reasons.extend(cls._value_type.validate(values, cls._type))