Skip to content

Commit

Permalink
in facebook_login uid is passed as int although it's char in model,
Browse files Browse the repository at this point in the history
changed to:
>>> user = authenticate(uid=str(request.facebook.uid))
this breaks postgres current transaction and next transaction with bad sql code and throws untraceable exception
in python/django. can be tracked in postgres log.
  • Loading branch information
aljosa authored and flashingpumpkin committed Feb 25, 2010
1 parent e28d48a commit 51df0e4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions socialregistration/views.py
Expand Up @@ -64,8 +64,11 @@ def setup(request, template='socialregistration/setup.html',
form.save()
user = form.profile.authenticate()
login(request, user)
del request.session['socialregistration_user']
del request.session['socialregistration_profile']
if request.session.has_key('socialregistration_user'):
del request.session['socialregistration_user']
if request.session.has_key('socialregistration_profile'):
del request.session['socialregistration_profile']

return HttpResponseRedirect(_get_next(request))

extra_context.update(dict(form=form))
Expand Down Expand Up @@ -108,7 +111,7 @@ def facebook_login(request, template='socialregistration/facebook.html',
template, extra_context, context_instance=RequestContext(request)
)

user = authenticate(uid=request.facebook.uid)
user = authenticate(uid=str(request.facebook.uid))

if user is None:
request.session['socialregistration_user'] = User()
Expand Down

0 comments on commit 51df0e4

Please sign in to comment.