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

get related object for all_objects #75

Open
malinich opened this issue Apr 2, 2018 · 0 comments
Open

get related object for all_objects #75

malinich opened this issue Apr 2, 2018 · 0 comments

Comments

@malinich
Copy link

malinich commented Apr 2, 2018

I have model

class Incident(PermanentModel):  
   petition = models.ForeignKey('Petition', related_name='incidents')  

class Petition(PermanentModel):
    .....

Now I need relate all objects

i = Incident.all_objects.get(pk=..)
i.petition  # <-- here in DB i have in WHERE clause ("petition"."removed" IS NULL)

I don't know how to solve this. In docs I no find the examples

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