diff --git a/bt5/erp5_knowledge_pad/ExtensionTemplateItem/GetRssDataAsDict.py b/bt5/erp5_knowledge_pad/ExtensionTemplateItem/GetRssDataAsDict.py index 4ae475363480f8d30e906fdb32833ec483996a53..3bc3e771c9a92295a5d630f513182bed83335002 100644 --- a/bt5/erp5_knowledge_pad/ExtensionTemplateItem/GetRssDataAsDict.py +++ b/bt5/erp5_knowledge_pad/ExtensionTemplateItem/GetRssDataAsDict.py @@ -43,10 +43,10 @@ def getRssDataAsDict(self, url, username=None, password=None): entry_dict['link'] = entry['link'] entry_dict['other_links'] = [x['href'] for x in entry['links']] entry_dict['md5'] = md5.new(entry['link']).hexdigest() - entry_dict['content'] = entry['summary'] - entry_dict['date'] = entry['updated'] + entry_dict['content'] = entry.get('summary', '') + entry_dict['date'] = entry.get('updated', None) entry_dict['img'] = [x['href'] for x in entry.get('enclosures', [])] - entry_dict['updated_parsed'] = entry['updated_parsed'] + entry_dict['updated_parsed'] = entry.get('updated_parsed', None) result['items'].append(entry_dict) # sort by date result['items'] = sorted(result['items'], key=lambda k: k['updated_parsed']) diff --git a/bt5/erp5_knowledge_pad/bt/revision b/bt5/erp5_knowledge_pad/bt/revision index 1fb8d9e69e69176dcaf94f76f644aa67d53a7995..a7ff3ab0095a78c316c543590940cc822255dc96 100644 --- a/bt5/erp5_knowledge_pad/bt/revision +++ b/bt5/erp5_knowledge_pad/bt/revision @@ -1 +1 @@ -601 \ No newline at end of file +605 \ No newline at end of file