Commit 99280222 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou

astakos: Avoid using dicts as default arguments

parent 44a40b77
......@@ -87,10 +87,19 @@ def get_pending_key(request):
def handle_third_party_signup(request, userid, provider_module,
third_party_key,
provider_info={},
pending_user_params={},
provider_info=None,
pending_user_params=None,
template="im/third_party_check_local.html",
extra_context={}):
extra_context=None):
if provider_info is None:
provider_info = {}
if pending_user_params is None:
pending_user_params = {}
if extra_context is None:
extra_context = {}
# build provider module object
provider_data = {
......
......@@ -114,9 +114,12 @@ def login(request):
def authenticated(
request,
template='im/third_party_check_local.html',
extra_context={}
extra_context=None
):
if extra_context is None:
extra_context = {}
if request.GET.get('error', None):
return HttpResponseRedirect(reverse('edit_profile'))
......
......@@ -100,9 +100,12 @@ def login(request):
def authenticated(
request,
template='im/third_party_check_local.html',
extra_context={}
extra_context=None
):
if extra_context is None:
extra_context = {}
consumer = oauth.Consumer(settings.LINKEDIN_TOKEN,
settings.LINKEDIN_SECRET)
client = oauth.Client(consumer)
......
......@@ -107,7 +107,10 @@ def login(request):
def authenticated(
request,
template='im/third_party_check_local.html',
extra_context={}):
extra_context=None):
if extra_context is None:
extra_context = {}
consumer = oauth.Consumer(settings.TWITTER_TOKEN,
settings.TWITTER_SECRET)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment