X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=rest%2Fcredentials.py;h=a8c8ba7e4833b152347c53cdeca7989ee01684ed;hb=ddcdaf8d61df7f4a2a0da11c23190b56ed914464;hp=d63babfb83382975d3b60aeef8a5ffcffeb19c61;hpb=75fb889a57311c7755c2a326c4f3206c07f8cff5;p=myslice.git diff --git a/rest/credentials.py b/rest/credentials.py index d63babfb..a8c8ba7e 100644 --- a/rest/credentials.py +++ b/rest/credentials.py @@ -7,15 +7,19 @@ def dispatch(request, action): if (action == 'clear') : res=[] emails = request.POST.getlist('emails[]') + if not emails: + emails = request.GET.getlist('emails[]') 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 }