Ticket #12962: modeladmin-12595.diff

File modeladmin-12595.diff, 1.4 KB (added by Preston Holmes, 15 years ago)
  • django/contrib/admin/options.py

     
    698698        changelist; it returns an HttpResponse if the action was handled, and
    699699        None otherwise.
    700700        """
    701         if 'index' not in request.POST:
    702             # If "Go" was not pushed then we can assume the POST was for
    703             # an inline edit save and we do not need to validate the form.
    704             return None
    705701
    706702        # There can be multiple action forms on the page (at the top
    707703        # and bottom of the change list, for example). Get the action
     
    978974            return HttpResponseRedirect(request.path + '?' + ERROR_FLAG + '=1')
    979975
    980976        # If the request was POSTed, this might be a bulk action or a bulk edit.
    981         # Try to look up an action first, but if this isn't an action the POST
     977        # Try to look up an action or confirmation first, but if this isn't an action the POST
    982978        # will fall through to the bulk edit check, below.
    983         if actions and request.method == 'POST':
     979        if actions and request.method == 'POST' and (helpers.ACTION_CHECKBOX_NAME in request.POST or 'index' in request.POST):
    984980            response = self.response_action(request, queryset=cl.get_query_set())
    985981            if response:
    986982                return response
Back to Top