Field value

main
Bob Mottram 2021-07-27 18:01:47 +01:00
parent bd468c46de
commit cc7d7123a7
1 changed files with 5 additions and 5 deletions

View File

@ -4834,16 +4834,17 @@ class PubServer(BaseHTTPRequestHandler):
sharedItemsFederatedDomainsStr = \ sharedItemsFederatedDomainsStr = \
getConfigParam(baseDir, getConfigParam(baseDir,
"sharedItemsFederatedDomains") "sharedItemsFederatedDomains")
if not sharedItemsFederatedDomainsStr:
sharedItemsFederatedDomainsStr = ''
sharedItemsFormStr = '' sharedItemsFormStr = ''
if sharedItemsFederatedDomainsStr and \ if fields.get('shareDomainList'):
fields.get('shareDomainList'):
sharedItemsList = \ sharedItemsList = \
sharedItemsFederatedDomainsStr.split(',') sharedItemsFederatedDomainsStr.split(',')
for sharedFederatedDomain in sharedItemsList: for sharedFederatedDomain in sharedItemsList:
sharedItemsFormStr += \ sharedItemsFormStr += \
sharedFederatedDomain.strip() + '\n' sharedFederatedDomain.strip() + '\n'
if fields.get('shareDomainList') != \ if fields['shareDomainList'] != \
sharedItemsFormStr: sharedItemsFormStr:
sharedItemsFormStr2 = \ sharedItemsFormStr2 = \
sharedItemsFormStr.replace('\n', ',') sharedItemsFormStr.replace('\n', ',')
@ -4853,8 +4854,7 @@ class PubServer(BaseHTTPRequestHandler):
sharedItemsFormStr2) sharedItemsFormStr2)
siDomainUpdated = True siDomainUpdated = True
else: else:
if not fields.get('shareDomainList') and \ if sharedItemsFederatedDomainsStr:
sharedItemsFederatedDomainsStr:
sharedItemsField = \ sharedItemsField = \
"sharedItemsFederatedDomains" "sharedItemsFederatedDomains"
setConfigParam(baseDir, sharedItemsField, setConfigParam(baseDir, sharedItemsField,