is there a way to only get one of the duplicates in a queryste? django
you can do that using distinct in your orm query eg.Model.objects.filter(user='myname').distinct('field_name')
this will give you only distinct values based on the field that you provide.
I am not trying to get all duplicate querysets and I am not trying to compare two queryset results and see of the two comparison are the same.
Somehow, I have no idea how this happened yet but sometimes there are records being saved twice and some not.  So when I do querying my result would sometimes have duplicates.
For example, I am just doing Model.objects.filter(user='myname')
I would get maybe 50 instances back, all of them should be different.  But somehow maybe id 11 and 12 have the exact same values then 23 and 24 has the same values and the others are totally fine.
So actually within those 50 instances, there are 2 duplicates which means I should only have 48 instances instead of 50 to be accurrate.
Is there a way to check the queryset and return only one of the duplicates with other querysets if the values are totally the same?