mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-09 23:20:27 +00:00
fix: Use json.dumps instead of str
This commit is contained in:
parent
06ffee18a0
commit
64f7968af9
@ -1,3 +1,4 @@
|
|||||||
|
import json
|
||||||
import re
|
import re
|
||||||
import traceback
|
import traceback
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
@ -421,7 +422,7 @@ class Domain(db.Model):
|
|||||||
if result['status'] == 'ok':
|
if result['status'] == 'ok':
|
||||||
history = History(msg='Add reverse lookup domain {0}'.format(
|
history = History(msg='Add reverse lookup domain {0}'.format(
|
||||||
domain_reverse_name),
|
domain_reverse_name),
|
||||||
detail=str({
|
detail=json.dumps({
|
||||||
'domain_type': 'Master',
|
'domain_type': 'Master',
|
||||||
'domain_master_ips': ''
|
'domain_master_ips': ''
|
||||||
}),
|
}),
|
||||||
|
@ -544,7 +544,7 @@ def setting(domain_name):
|
|||||||
history = History(
|
history = History(
|
||||||
msg='Change domain {0} access control'.format(
|
msg='Change domain {0} access control'.format(
|
||||||
pretty_domain_name(domain_name)),
|
pretty_domain_name(domain_name)),
|
||||||
detail=str({'user_has_access': new_user_list}),
|
detail=json.dumps({'user_has_access': new_user_list}),
|
||||||
created_by=current_user.username,
|
created_by=current_user.username,
|
||||||
domain_id=d.id)
|
domain_id=d.id)
|
||||||
history.add()
|
history.add()
|
||||||
@ -582,7 +582,7 @@ def change_type(domain_name):
|
|||||||
if status['status'] == 'ok':
|
if status['status'] == 'ok':
|
||||||
history = History(msg='Update type for domain {0}'.format(
|
history = History(msg='Update type for domain {0}'.format(
|
||||||
pretty_domain_name(domain_name)),
|
pretty_domain_name(domain_name)),
|
||||||
detail=str({
|
detail=json.dumps({
|
||||||
"domain": domain_name,
|
"domain": domain_name,
|
||||||
"type": domain_type,
|
"type": domain_type,
|
||||||
"masters": domain_master_ips
|
"masters": domain_master_ips
|
||||||
|
Loading…
Reference in New Issue
Block a user