Skip to content

Getting "Entry object has no attribute get_ancestors" if Entry is empty #59

@paramono

Description

@paramono

I found quite a silly bug related to interopability of feincms and elephantblog.

If you create an empty elephantblog entry (by "empty" I mean with no content types added to it), then the following error will appear:

'Entry' object has no attribute 'get_ancestors'
(Line in question)

Although it's not something critical, since website administrators are unlikely to create a post with no content blocks, still, if somebody does that by accident, it's a little annoying.

I wonder how to fix this issue? Wrap get_ancestors in try/except, and catch the potential error? Or do something on elephant_blog side?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions