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:
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user