luci-app-ddns: fix wrong service with custom selected

If custom service is selected, no service is actually set in the uci config.
Fallback to custom service if no service is detected in the config.

Fixes #4301

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
This commit is contained in:
Ansuel Smith 2020-08-22 19:58:28 +02:00
parent 88b9d58a44
commit 8aac2a339a
No known key found for this signature in database
GPG key ID: AC001D09ADBFEAD7

View file

@ -486,7 +486,7 @@ return L.view.extend({
o.value('-',"-- " + _("custom") + " --"); o.value('-',"-- " + _("custom") + " --");
o.cfgvalue = function(section_id) { o.cfgvalue = function(section_id) {
return uci.get('ddns', section_id, 'service_name'); return uci.get('ddns', section_id, 'service_name') || '-';
} }
o.write = function(section_id, formvalue) { o.write = function(section_id, formvalue) {