diff --git a/plinth/modules/dynamicdns/dynamicdns.py b/plinth/modules/dynamicdns/dynamicdns.py index 7d3b75240..911049779 100644 --- a/plinth/modules/dynamicdns/dynamicdns.py +++ b/plinth/modules/dynamicdns/dynamicdns.py @@ -165,8 +165,14 @@ class ConfigureForm(forms.Form): dynamicdns_secret = cleaned_data.get('dynamicdns_secret') dynamicdns_update_url = cleaned_data.get('dynamicdns_update_url') dynamicdns_server = cleaned_data.get('dynamicdns_server') + service_type = cleaned_data.get('service_type') old_dynamicdns_secret = self.initial['dynamicdns_secret'] + if service_type == '1': + dynamicdns_update_url = "" + else: + dynamicdns_server = "" + """Todo: this is not working!! will see tomorrow why""" if not dynamicdns_update_url and not dynamicdns_server: raise forms.ValidationError('please give update URL or \ @@ -319,11 +325,6 @@ def _apply_changes(request, old_status, new_status): if new_status['dynamicdns_server'] == '': new_status['dynamicdns_server'] = EMPTYSTRING - if new_status['service_type'] == '1': - new_status['dynamicdns_ipurl'] = EMPTYSTRING - else: - new_status['dynamicdns_server'] = EMPTYSTRING - if old_status != new_status: disable_ssl_check = "disabled" use_http_basic_auth = "disabled"