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