79341398

Date: 2025-01-09 04:45:43
Score: 0.5
Natty:
Report link

when you add .values('pk') it alters the structure of the queryset in such a way that

  1. .values() generates a queryset of dictionaries containing only the specified fields (pk in this case).
  2. the annotated fields (like part_description_lower) are no longer part of the queryset output.
  3. when distinct("part_description_lower") is called, django cannot resolve part_description_lower because it is no longer available in the queryset context.
Reasons:
  • Has code block (-0.5):
  • Starts with a question (0.5): when you addit
  • Low reputation (0.5):
Posted by: Yuvraj