X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=rest%2Fcredentials.py;h=632600a3513c2c8211ef0bf4d74b180ef056fbf8;hb=2842fc88e027493dd9ae00e0f8a69a86f3d50680;hp=d63babfb83382975d3b60aeef8a5ffcffeb19c61;hpb=0545cbc7e948eb0ec3109e7ac69e1fb458feb9d9;p=unfold.git diff --git a/rest/credentials.py b/rest/credentials.py index d63babfb..632600a3 100644 --- a/rest/credentials.py +++ b/rest/credentials.py @@ -7,15 +7,21 @@ def dispatch(request, action): if (action == 'clear') : res=[] emails = request.POST.getlist('emails[]') + if not emails: + emails = request.GET.getlist('emails[]') + import pdb + pdb.set_trace() if emails : for email in emails : try : - res.append(clear_user_creds(request, email)) + clear = clear_user_creds(request, email) + if clear is not None: + res.append(clear) except : pass if not res : - ret = { "ret" : 1, "emails" : res } + ret = { "ret" : 1, "emails" : emails } else : ret = { "ret" : 0 }