Changes between Version 3 and Version 4 of Ticket #28101
- Timestamp:
- Apr 20, 2017, 7:38:52 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28101
- Property Summary Wrong field used for sub query lookup on nested query using to_field ForeignKey → #26196 regression - __in lookups does not honor to_field
-
Ticket #28101 – Description
v3 v4 69 69 which attempts to match the wrong `Customer`-field to `CustomerProduct.customer_id`. 70 70 71 I tried to figure out what was going on and the test passes if I add `print(self)` to `Queryset._prepare_as_filter_value` in the forced pk block. Quite arbitrary placement of the print, and probably not related to `_prepare_as_filter_value`. My guess would be that the evaluation of the inner queryset fixes some field matching some other place - but I'm way out of my depth here :)71 I tried to figure out what was going on and the test passes if I add `print(self)` to `Queryset._prepare_as_filter_value` in the forced pk block. This causes the inner_qs to be evaluated, and thus simulating the the behavior before 7a2c27112d1f804f75191e9bf45a96a89318a684 was applied. 72 72 73 73 The tests were added directly to `tests/queries/tests.py` and the models to `tests/queries/models.py` and run using Django's test suite. 74 74 75 Might be related: [https://code.djangoproject.com/ticket/26196] 75 Related: #26196 76 76 77 77 Running git bisect found the following change as the first bad one, so seems like a regression.