mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-12-27 05:25:40 +00:00
Delete settings related to domain on domain deleting
Because this bug domain deleting isn't possible when a domain specific attribute is set (eg. dyndns). This modification delete domain settings before domain deleting.
This commit is contained in:
parent
c81deb0044
commit
94b0d26142
@ -507,6 +507,10 @@ class Domain(db.Model):
|
||||
if domain_user:
|
||||
domain_user.delete()
|
||||
db.session.commit()
|
||||
domain_setting = DomainSetting.query.filter(DomainSetting.domain_id==domain.id)
|
||||
if domain_setting:
|
||||
domain_setting.delete()
|
||||
db.session.commit()
|
||||
|
||||
# then remove domain
|
||||
Domain.query.filter(Domain.name == d).delete()
|
||||
|
Loading…
Reference in New Issue
Block a user