We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
VERSIONS: Grappelli 3.0.5, Django 4.1 STATICFILES: OK JAVASCRIPTS: OK PYTHON BUG: TRUE
RelatedLookup view returns incorrect option label ("?") if ForeignKey has limit_choices_to attribute with IN statement. Example:
RelatedLookup
"?"
ForeignKey
limit_choices_to
IN
class Category(models.Model): name = models.CharField("Title", max_length=50, unique=True) class Entry(models.Model): title = models.CharField("Title", max_length=200) category = models.ForeignKey(Category, on_delete=models.SET_NULL, related_name="entries", blank=True, null=True, limit_choices_to={"id__in": [1, 2]})
The reason is the param query_string which is quoted. It should be unquoted at RelatedLookup.get_filtered_queryset method.
query_string
RelatedLookup.get_filtered_queryset
The text was updated successfully, but these errors were encountered:
sehmaschine#1015 Fixed incorrect label for ForeignKey with limit_choi…
13e0ffc
…ces_to
Merge pull request #1016 from toshka/stable/3.0.x
693a8d4
Incorrect label of option returned by RelatedLookup view #1015
@sehmaschine is it possible to release 3.0.6 version?
Sorry, something went wrong.
@toshka waiting for a couple of replies on existing issues (and pull-requests). planning on doing the release early next week.
No branches or pull requests
VERSIONS: Grappelli 3.0.5, Django 4.1
STATICFILES: OK
JAVASCRIPTS: OK
PYTHON BUG: TRUE
RelatedLookup
view returns incorrect option label ("?"
) ifForeignKey
haslimit_choices_to
attribute withIN
statement.Example:
The reason is the param
query_string
which is quoted.It should be unquoted at
RelatedLookup.get_filtered_queryset
method.The text was updated successfully, but these errors were encountered: