fix feedreader handling unrecognized published date (#28225)

This commit is contained in:
Malte Franken authored and Fabian Affolter committed 2019-10-31 21:05:42 +01:00
1 parent 82729bef70
commit d200c2dca2
3 files changed
+30 -3

No files matched your search

@@ -139,9 +139,10 @@ class FeedManager:
def _update_and_fire_entry(self, entry):
"""Update last_entry_timestamp and fire entry."""
# We are lucky, `published_parsed` data available, let's make use of
# it to publish only new available entries since the last run
if "published_parsed" in entry.keys():
# Check if the entry has a published date.
if "published_parsed" in entry.keys() and entry.published_parsed:
# We are lucky, `published_parsed` data available, let's make use of
# it to publish only new available entries since the last run
self._has_published_parsed = True
self._last_entry_timestamp = max(
entry.published_parsed, self._last_entry_timestamp