mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-03-01 11:41:32 +00:00
Fix foreign key constraint error on MySQL
(cherry picked from commit 2a9108f90482a6be86d0b8af4dfcc30f6651ff28)
This commit is contained in:
parent
a4af4ad4b3
commit
2b3b67a3af
@ -486,7 +486,7 @@ class Account(db.Model):
|
||||
"""
|
||||
account = Account.query.filter(Account.name == account_name).first()
|
||||
if account is None:
|
||||
return 0
|
||||
return None
|
||||
|
||||
return account.id
|
||||
|
||||
@ -664,7 +664,7 @@ class Domain(db.Model):
|
||||
notified_serial = db.Column(db.Integer)
|
||||
last_check = db.Column(db.Integer)
|
||||
dnssec = db.Column(db.Integer)
|
||||
account_id = db.Column(db.Integer, db.ForeignKey('account.id'), nullable = False)
|
||||
account_id = db.Column(db.Integer, db.ForeignKey('account.id'))
|
||||
account = db.relationship("Account", back_populates="domains")
|
||||
settings = db.relationship('DomainSetting', back_populates='domain')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user