mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Simplify _include_change check
This commit is contained in:
@@ -251,15 +251,8 @@ class CloudflareProvider(BaseProvider):
|
|||||||
|
|
||||||
# If this is a record to enable Cloudflare CDN don't update as
|
# If this is a record to enable Cloudflare CDN don't update as
|
||||||
# we don't know the original values.
|
# we don't know the original values.
|
||||||
if (hasattr(change.new, '_type') and
|
if (change.record._type in ('ALIAS', 'CNAME') and
|
||||||
(change.new._type == 'CNAME' or
|
change.record.value.endswith('.cdn.cloudflare.net.')):
|
||||||
change.new._type == 'ALIAS') and
|
|
||||||
change.new.value.endswith('.cdn.cloudflare.net.')):
|
|
||||||
return False
|
|
||||||
if (hasattr(change.existing, '_type') and
|
|
||||||
(change.existing._type == 'CNAME' or
|
|
||||||
change.existing._type == 'ALIAS') and
|
|
||||||
change.existing.value.endswith('.cdn.cloudflare.net.')):
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
Reference in New Issue
Block a user