Signal result verification

Bug #634382 reported by krig
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Scipio
Fix Committed
Undecided
Unassigned

Bug Description

Django 1.2.2
Scipio 0.2

In views.py, "complete" function:

results = signals.authenticated.send(request, user=user, **data)
for r in results:
  if isinstance(r, http.HttpResponse):
    response = r
    break

isinstance(r, http.HttpResponse) never returns True, as results is list of tuples (signal callback, callback result).
Correct code is:

if isinstance(r[1], http.HttpResponse):
  response = r[1]
  break

PS: Sorry, can't attach this fix as a patch as currently scipio version I use is slightly modified. Will publish a fork to github when will be ready to use as standalone app.

krig (vgarvardt)
description: updated
description: updated
Revision history for this message
Ivan Sagalaev (isagalaev) wrote :

Fixed, thanks! (Though a bit differently)

Changed in scipio:
status: New → Fix Committed
Revision history for this message
krig (vgarvardt) wrote :

Your version is much better, so I'll apply it to my branch =)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.