stefanpejcic / OpenPanel

A highly customizable web hosting control panel built with Docker 🐳
https://openpanel.com
216 stars 33 forks source link

/domains/edit-dns-zone 500 error after 0.1.7 update #120

Closed stefanpejcic closed 5 months ago

stefanpejcic commented 6 months ago

OpenPanel version(s) affected

0.1.8

Description

bug introduced in 0.1.7 after dividing domains.py to domains.py and dns.py

How to reproduce

Open link OpenPanel /domains/edit-dns-zone - shows 500 error

tail /var/log/openpanel/user/error.log 
  File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 872, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 870, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 855, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
  File "<frozen 2083.app>", line 364, in wrapper
  File "/usr/local/panel/modules/dns.py", line 181, in edit_dns_zone
    domain = Domain(domain_dict['domain_id'], domain_dict['domain_name'], domain_dict['domain_url'])
NameError: name 'Domain' is not defined

Possible Solution

No response

Additional Context

No response

radovanjecmenica commented 5 months ago

Fixed