Skip to content

Conversation

@Photonios
Copy link
Collaborator

In Django 4.2, process_lhs() is called for IsNull lookups, which is how this bug came to appear. It was already there and could be reproduced on Django 3.2.

The issue is when LocalizedRef is combined with a localized lookup. The lookup is unaware of the existing localized ref and adds another transform on top. This results in the expression becoming:

field->'en'->'en'

In Django 4.2, `process_lhs()` is called for IsNull lookups,
which is how this bug came to appear. It was already there
and could be reproduced on Django 3.2.

The issue is when `LocalizedRef` is combined with a localized
lookup. The lookup is unaware of the existing localized ref
and adds another transform on top. This results in the
expression becoming:

```
field->'en'->'en'
```
@Photonios Photonios force-pushed the lookup-django42-fix branch from 30d92dc to 153f866 Compare July 1, 2024 13:52
@Photonios Photonios requested a review from tudorvaran July 1, 2024 13:58
@Photonios Photonios merged commit e6527ff into master Jul 2, 2024
@Photonios Photonios deleted the lookup-django42-fix branch July 2, 2024 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants