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

Relation tagged with through model doesn't work as expected #14

Open
frmdstryr opened this issue Jun 24, 2020 · 0 comments
Open

Relation tagged with through model doesn't work as expected #14

frmdstryr opened this issue Jun 24, 2020 · 0 comments

Comments

@frmdstryr
Copy link
Contributor

With models like

class User(Model):
    groups = Relation(lambda: Group).tag(through=lambda: UserGroup)

class Group(Model):
   # ...

class UserGroup(Model):
    user = Instance(User)
    group = Instance(Group)

I should be able to just filter by User.objects.filter(group=group) which should figure out from the through model that it should filter by user_group.group == group

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