Did you open a ticket?

https://code.djangoproject.com/


אורי
u...@speedy.net


On Mon, Mar 29, 2021 at 11:18 PM Nathaniel Brown <aega...@gmail.com> wrote:

> Basically when I try to exclude all members that have cancelled standing
> from all the poems it breaks and includes all Poems no matter if the member
> was cancelled.
>
> You can remove the order_by and reverse clauses on the poems_created and
> the list shows fine, yet when I add a order_by it has no effect. And when I
> add the reverse it does as previously explained, shows all poems no matter
> if the member was cancelled.
>
> Member has lets say two fields, a User pk and a standing; a Poem has
> created by and a Title with a submitter relating to the User pk.
>
> Here is the sample code:
>
> members_cancelled =
> Member.objects.exclude(standing=settings.MEMBER_STANDING_CANCELLED).values_list('pk',
> flat=True)
> poems_created =
> Poem.objects.exclude(submitter__in=list(members_cancelled),
> hidden=True).order_by('created').reverse()
>
> Thanks in advance in you've got this far.
>
> Nate
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/c76e2a29-e036-495b-8b03-397b943217b9n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/c76e2a29-e036-495b-8b03-397b943217b9n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CABD5YeEGp6Y1vEFvUmBhHTn3SWMBoqKdBeXp%3DBgqAXbOQSfvDA%40mail.gmail.com.

Reply via email to