#15212: get_actions() always needs to return SortedDict, not list
----------------------------------+-----------------------------------------
Reporter: philomat | Owner: nobody
Status: new | Milestone:
Component: django.contrib.admin | Version: SVN
Keywords: | Triage Stage: Unreviewed
Has patch: 1 |
----------------------------------+-----------------------------------------
All docs state that get_actions() returns a dict. From documentation of
ModelAdmin.get_actions():
{{{
"""
Return a __dictionary__ mapping the names of all actions...
"""
}}}
However:
{{{
if self.actions is None or IS_POPUP_VAR in request.GET:
return [] # list!
}}}
This can lead to problems when you extend that method and expect a dict,
and treat its return value as such trying to modify its elements. My patch
returns an empty SortedDict.
--
Ticket URL: <http://code.djangoproject.com/ticket/15212>
Django <http://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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.