X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=rest%2Fcredentials.py;h=a8c8ba7e4833b152347c53cdeca7989ee01684ed;hb=07bad1e2f69df285d8764eb2d243b31d8e6c8e3d;hp=d63babfb83382975d3b60aeef8a5ffcffeb19c61;hpb=e71aad493c1d1d2c4a275f1f138932f605461a41;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 }