AlexJF/pelican-entities

CRITICAL: module 'pelican.contents' has no attribute 'is_valid_content' (Pelican 4.0)

fogasl opened this issue · 0 comments

Using this module with Pelican > 4.0 gives this error message:
CRITICAL: module 'pelican.contents' has no attribute 'is_valid_content'

I identified the error is in the file entities.py in line 419:

if not contents.is_valid_content(entity_or_draft, f):
    self._add_failed_source_path(f)
    continue

My quick & dirty fix for this problem was replacing those lines with this:

if not entity_or_draft.is_valid():
    self._add_failed_source_path(f)
    continue

--

Laszlo