mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
networks: Fix issue with loading create PPPoE form
- The form does not have DNS-over-TLS field and trying to set initial value for it fails. Tests: - Load the PPPoE creation form. Without the patch, it fails with an exception. With the patch it succeeds. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
parent
c1a8607d85
commit
b465c33e1b
@ -168,8 +168,9 @@ class ConnectionForm(forms.Form):
|
||||
"""Disable DNS fallback field if necessary."""
|
||||
from plinth.modules import names
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fields['dns_over_tls'].disabled = (
|
||||
not names.is_resolved_installed())
|
||||
if 'dns_over_tls' in self.fields:
|
||||
self.fields['dns_over_tls'].disabled = (
|
||||
not names.is_resolved_installed())
|
||||
|
||||
@staticmethod
|
||||
def _get_interface_choices(device_type):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user