[Answer]-Check if object is in another queryset?

1👍

I don’t think that part is the problem. You don’t define any ordering on Week, so you can in no way guarantee that you get the correct week objects. Use .order_by('-date') or define ordering in your Meta class.

x in y returns True if y contains a model with the same concrete model, x.pk is not None and x.pk == y.pk.

👤knbk

Leave a comment