Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kindlycat opened this issue Jun 26, 2019 · 0 comments

Comments

@kindlycat
Copy link

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 kindlycat changed the title Error when passing filter arguments in get_previous_sibling/get_next_sibling methods Error when passing filter arguments to get_previous_sibling/get_next_sibling methods Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant