From cc7d7123a750a5dcbe08f40d60dc8e996761e4f4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 27 Jul 2021 18:01:47 +0100 Subject: [PATCH] Field value --- daemon.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/daemon.py b/daemon.py index e21191fe4..a58d981c5 100644 --- a/daemon.py +++ b/daemon.py @@ -4834,16 +4834,17 @@ class PubServer(BaseHTTPRequestHandler): sharedItemsFederatedDomainsStr = \ getConfigParam(baseDir, "sharedItemsFederatedDomains") + if not sharedItemsFederatedDomainsStr: + sharedItemsFederatedDomainsStr = '' sharedItemsFormStr = '' - if sharedItemsFederatedDomainsStr and \ - fields.get('shareDomainList'): + if fields.get('shareDomainList'): sharedItemsList = \ sharedItemsFederatedDomainsStr.split(',') for sharedFederatedDomain in sharedItemsList: sharedItemsFormStr += \ sharedFederatedDomain.strip() + '\n' - if fields.get('shareDomainList') != \ + if fields['shareDomainList'] != \ sharedItemsFormStr: sharedItemsFormStr2 = \ sharedItemsFormStr.replace('\n', ',') @@ -4853,8 +4854,7 @@ class PubServer(BaseHTTPRequestHandler): sharedItemsFormStr2) siDomainUpdated = True else: - if not fields.get('shareDomainList') and \ - sharedItemsFederatedDomainsStr: + if sharedItemsFederatedDomainsStr: sharedItemsField = \ "sharedItemsFederatedDomains" setConfigParam(baseDir, sharedItemsField,