From ce057ebd2228f46f64f5f2b05815c12d72ab8bb6 Mon Sep 17 00:00:00 2001 From: Daniel Steglich Date: Fri, 6 Mar 2015 23:27:45 +0100 Subject: [PATCH] need to remove unused parameters according to dropdown box selection --- plinth/modules/dynamicdns/dynamicdns.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plinth/modules/dynamicdns/dynamicdns.py b/plinth/modules/dynamicdns/dynamicdns.py index 911049779..54aed9ffb 100644 --- a/plinth/modules/dynamicdns/dynamicdns.py +++ b/plinth/modules/dynamicdns/dynamicdns.py @@ -173,7 +173,6 @@ class ConfigureForm(forms.Form): 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 \ a GnuDIP Server') @@ -325,6 +324,11 @@ 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_update_url'] = EMPTYSTRING + else: + new_status['dynamicdns_server'] = EMPTYSTRING + if old_status != new_status: disable_ssl_check = "disabled" use_http_basic_auth = "disabled"