Commits

Adam Fast  committed 6f2c63b

Don't blindly set the value, delete it if it exists instead. Otherwise you negatively impact your cache hit count.

  • Participants
  • Parent commits 26355bb

Comments (0)

Files changed (1)

File socialregistration/templatetags/socialregistration_tags.py

         context['openid_provider'] = request.session.get('openid_provider', '')
 
         # clear the error once it's been displayed once
-        request.session['openid_error'] = ''
-        request.session['openid_provider'] = ''
+        if request.session.get('openid_error', False):
+            del request.session['openid_error']
+        if request.session.get('openid_provider', False):
+            del request.session['openid_provider']
 
         return u''