New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed #33966 -- Added support for using KeyTextTransform from lookup. #16016
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AllenJonathan Thanks 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AllenJonathan Thanks 👍 I left comments, please add also a release note.
django/db/models/fields/json.py
Outdated
def from_lookup(cls, lookup): | ||
transform, *keys = lookup.split(LOOKUP_SEP) | ||
if not keys: | ||
raise ValueError("Missing keys") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raise ValueError("Missing keys") | |
raise ValueError("lookup cannot be empty.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Providing a non-empty lookup
- giving only transform
would produce this error. Wouldn't this be incorrect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, maybe "lookup must contains key or index transforms." 🤔 .
Just the error needs discussion. I've made all the other suggested changes. |
@AllenJonathan Thanks 👍 |
74923ff
to
81390b7
Compare
81390b7
to
1017819
Compare
No description provided.