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


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

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30771, comment 3

    v1 v2  
    55https://github.com/django/django/blob/ea25bdc2b94466bb1563000bf81628dea4d80612/django/db/models/lookups.py#L265-L267
    66
    7 We probably don't want to perform the `clear_select_clause` and `add_fields(['pk'])` when the query is already only selecting a single field.
     7We probably don't want to perform the `clear_select_clause` and `add_fields(['pk'])` when the query is already selecting fields.
    88
    99That'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