Fix KeyError : geo attribute can not exists
This commit is contained in:
parent
83227cfad2
commit
3b3ae1ea3e
|
@ -82,7 +82,7 @@ class IWLADisplayTopGeo(IPlugin):
|
|||
|
||||
def hook(self):
|
||||
display = self.iwla.getDisplay()
|
||||
geo = self.iwla.getMonthStats()['geo']
|
||||
geo = self.iwla.getMonthStats().get('geo', {})
|
||||
geo = sorted(geo.items(), key=lambda t: t[1], reverse=True)
|
||||
self.valid_visitors = self.iwla.getValidVisitors()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user