django-polymorphic-tree icon indicating copy to clipboard operation
django-polymorphic-tree copied to clipboard

Error when passing filter arguments to get_previous_sibling/get_next_sibling methods

Open kindlycat opened this issue 6 years ago • 0 comments

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...

kindlycat avatar Jun 26 '19 18:06 kindlycat