Activate/deactivate filtering in django based on condition
I have a bool
and if it is True
, I want to filter in my query by some stuff, if not I don’t want to filter.
Prevent duplicates when filtering on prefetch_related
I have two models: Seller
and Product
.