mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-07-02 20:36:19 +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:
@ -507,6 +507,10 @@ class Domain(db.Model):
|
|||||||
if domain_user:
|
if domain_user:
|
||||||
domain_user.delete()
|
domain_user.delete()
|
||||||
db.session.commit()
|
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
|
# then remove domain
|
||||||
Domain.query.filter(Domain.name == d).delete()
|
Domain.query.filter(Domain.name == d).delete()
|
||||||
|
Reference in New Issue
Block a user