From a1e62281f6cd7cdf265930520b05ab7149f445df Mon Sep 17 00:00:00 2001 From: Jonathan Leroy Date: Sat, 31 Oct 2020 10:54:17 +0100 Subject: [PATCH] Fixes record copy when record is a child class of Record and as no record type specified in its data --- octodns/record/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/octodns/record/__init__.py b/octodns/record/__init__.py index 6c4e79f..ae9ccb1 100644 --- a/octodns/record/__init__.py +++ b/octodns/record/__init__.py @@ -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,