Changes between Initial Version and Version 1 of Ticket #30771, comment 3


Ignore:
Timestamp:
Sep 12, 2019, 11:25:13 PM (5 years ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30771, comment 3

    initial v1  
    66
    77We probably don't want to perform the `clear_select_clause` and `add_fields(['pk'])` when the query is already only selecting a single field.
     8
     9That's exactly what `In.process_rhs` [https://github.com/django/django/blob/ea25bdc2b94466bb1563000bf81628dea4d80612/django/db/models/lookups.py#L356-L358 does already] by only performing these operations `if not getattr(self.rhs, 'has_select_fields', True)`.
Back to Top