mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 22:50:26 +00:00
Convert value returned from UI to string before storing it in DB.
This should allow for differences in how database engine store booleans.
This commit is contained in:
parent
856b5ec84f
commit
58c19894a1
@ -456,7 +456,7 @@ def admin_setdomainsetting(domain_name):
|
||||
data = jdata['data']
|
||||
if jdata['action'] == 'set_setting':
|
||||
new_setting = data['setting']
|
||||
new_value = data['value']
|
||||
new_value = str(data['value'])
|
||||
domain = Domain.query.filter(Domain.name == domain_name).first()
|
||||
setting = DomainSetting.query.filter(DomainSetting.domain == domain).filter(DomainSetting.setting == new_setting).first()
|
||||
|
||||
@ -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 bool(int(ondemand_creation.value)) == True:
|
||||
if 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