Merge pull request #352 from tmuncks/cname-shortcut

Allow CNAMEs to point to '@'
This commit is contained in:
Khanh Ngo 2018-09-02 21:31:39 +07:00 committed by GitHub
commit d3c6a9fdb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1392,10 +1392,12 @@ class Record(object):
if ':' in r['record_name']: # dirty ipv6 check
r_name = r['record_name']
r_data = domain if r_type == 'CNAME' and r['record_data'] in ['@', ''] else r['record_data']
record = {
"name": r_name,
"type": r_type,
"content": r['record_data'],
"content": r_data,
"disabled": True if r['record_status'] == 'Disabled' else False,
"ttl": int(r['record_ttl']) if r['record_ttl'] else 3600,
}