#35915: QueryDict __getitem__ returns an empty list when the value is an empty
list
-------------------------------------+-------------------------------------
Reporter: Nguyễn Hồng Quân | Owner:
Type: | jburns6789
Cleanup/optimization | Status: assigned
Component: HTTP handling | Version: 5.1
Severity: Normal | Resolution:
Keywords: querydict | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by jburns6789):
Ok, looking over your suggestion,
I'm trying to figure out what I need to do, here is the doc section for
QuerySet
https://docs.djangoproject.com/en/5.1/ref/request-
response/#django.http.QueryDict
QueryDict.__getitem__(key)¶
Returns the value for the given key. If the key has more than one value,
it returns the last value. Raises
django.utils.datastructures.MultiValueDictKeyError if the key does not
exist. (This is a subclass of Python’s standard KeyError, so you can stick
to catching KeyError.)
I need to state when a QueryDict['key'] returns [ ], the said key is
associated with a empty list?
--
Ticket URL: <https://code.djangoproject.com/ticket/35915#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/010701934a788b33-520523be-881e-4710-82b9-d16e341cd860-000000%40eu-central-1.amazonses.com.