mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-01-07 19:05:39 +00:00
Fix dnssec data type to be compatible with Postgresql
This commit is contained in:
parent
8f8b26266b
commit
a9cd4911b9
@ -372,7 +372,7 @@ class Domain(db.Model):
|
|||||||
last_check = db.Column(db.Integer)
|
last_check = db.Column(db.Integer)
|
||||||
dnssec = db.Column(db.Integer)
|
dnssec = db.Column(db.Integer)
|
||||||
|
|
||||||
def __int__(self, id=None, name=None, master=None, type='NATIVE', serial=None, notified_serial=None, last_check=None, dnssec=None):
|
def __init__(self, id=None, name=None, master=None, type='NATIVE', serial=None, notified_serial=None, last_check=None, dnssec=None):
|
||||||
self.id = id
|
self.id = id
|
||||||
self.name = name
|
self.name = name
|
||||||
self.master = master
|
self.master = master
|
||||||
@ -457,7 +457,7 @@ class Domain(db.Model):
|
|||||||
d.type = data['kind']
|
d.type = data['kind']
|
||||||
d.serial = data['serial']
|
d.serial = data['serial']
|
||||||
d.notified_serial = data['notified_serial']
|
d.notified_serial = data['notified_serial']
|
||||||
d.last_check = data['last_check']
|
d.last_check = 1 if data['last_check'] else 0
|
||||||
d.dnssec = data['dnssec']
|
d.dnssec = data['dnssec']
|
||||||
else:
|
else:
|
||||||
# add new domain
|
# add new domain
|
||||||
@ -468,7 +468,7 @@ class Domain(db.Model):
|
|||||||
d.serial = data['serial']
|
d.serial = data['serial']
|
||||||
d.notified_serial = data['notified_serial']
|
d.notified_serial = data['notified_serial']
|
||||||
d.last_check = data['last_check']
|
d.last_check = data['last_check']
|
||||||
d.dnssec = data['dnssec']
|
d.dnssec = 1 if data['dnssec'] else 0
|
||||||
db.session.add(d)
|
db.session.add(d)
|
||||||
try:
|
try:
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
Loading…
Reference in New Issue
Block a user