Skip to content

Error when passing filter arguments to get_previous_sibling/get_next_sibling methods #72

@kindlycat

Description

@kindlycat
class Page(PolymorphicMPTTModel):
    parent = PolymorphicTreeForeignKey(
        to='self',
        blank=True,
        null=True,
        related_name='children',
        verbose_name='parent',
        on_delete=models.CASCADE
    )
    title = models.CharField('Title', max_length=100)
    is_public = models.BooleanField(default=True)


class HTMLPage(Page):
    pass

class TypedPage(Page):
    pass
page = Page.objects.first()
page.get_next_sibling(**{'is_public': True}) 

ProgrammingError: column app_typedpage.id does not exist
LINE 1: SELECT "app_typedpage"."id", "app_typedpage"."polymorphic_ct...

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