fix acces to view properties; optional use global copyright option

This commit is contained in:
Helmut Merz 2017-01-12 11:34:15 +01:00
parent b7c702f17d
commit 34926dde8c

View file

@ -105,7 +105,7 @@ class NodeView(BaseView):
@Lazy @Lazy
def viewConfigOptions(self): def viewConfigOptions(self):
result = {} result = {}
for opt in self.viewConfig['options']: for opt in self.viewConfig.get('options') or []:
if ':' in opt: if ':' in opt:
k, v = opt.split(':', 1) k, v = opt.split(':', 1)
result[k] = v.split(',') result[k] = v.split(',')
@ -113,9 +113,12 @@ class NodeView(BaseView):
result[opt] = True result[opt] = True
return result return result
#@Lazy @Lazy
def copyright(self): def copyright(self):
cr = self.viewConfigOptions.get('copyright') cr = self.viewConfigOptions.get('copyright')
if cr:
return cr[0]
cr = self.globalOptions('copyright')
return cr and cr[0] or 'cyberconcepts.org team' return cr and cr[0] or 'cyberconcepts.org team'
@Lazy @Lazy