Merge pull request #271 from sinzee/patch-1

Update models.py
This commit is contained in:
Khanh Ngo 2018-06-07 08:50:48 +07:00 committed by GitHub
commit 70b3060f5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -808,7 +808,7 @@ class Domain(db.Model):
headers = {}
headers['X-API-Key'] = PDNS_API_KEY
try:
jdata = utils.fetch_json(urljoin(PDNS_STATS_URL, API_EXTENDED_URL + '/servers/localhost/zones/{0}/axfr-retrieve'.format(domain)), headers=headers, method='PUT')
jdata = utils.fetch_json(urljoin(PDNS_STATS_URL, API_EXTENDED_URL + '/servers/localhost/zones/{0}/axfr-retrieve'.format(domain.name)), headers=headers, method='PUT')
return {'status': 'ok', 'msg': 'Update from Master successfully'}
except:
return {'status': 'error', 'msg': 'There was something wrong, please contact administrator'}