mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 14:40:27 +00:00
Validate ondemand_creation if the setting does not exist for a domain.
This commit is contained in:
parent
58c19894a1
commit
273a63db12
@ -755,7 +755,7 @@ def dyndns_update():
|
||||
return render_template('dyndns.html', response='911'), 200
|
||||
elif r.is_allowed:
|
||||
ondemand_creation = DomainSetting.query.filter(DomainSetting.domain == domain).filter(DomainSetting.setting == 'create_via_dyndns').first()
|
||||
if strtobool(ondemand_creation.value) == True:
|
||||
if (ondemand_creation != None) and (strtobool(ondemand_creation.value) == True):
|
||||
record = Record(name=hostname,type='A',data=myip,status=False,ttl=3600)
|
||||
result = record.add(domain.name)
|
||||
if result['status'] == 'ok':
|
||||
|
Loading…
Reference in New Issue
Block a user