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

Fixes record copy when record is a child class of Record and as no record

type specified in its data
This commit is contained in:
Jonathan Leroy
2020-10-31 10:54:17 +01:00
parent 4fb102e4be
commit a1e62281f6

View File

@@ -221,7 +221,11 @@ class Record(EqualityTupleMixin):
return Update(self, other)
def copy(self, zone=None):
return Record(
_type = getattr(self, '_type')
if not self._raw_data.get('type'):
self._raw_data['type'] = _type
return Record.new(
zone if zone else self.zone,
self.name,
self._raw_data,