Commit 5f000810 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

Fix signup

parent 9d071bcc
......@@ -456,7 +456,7 @@ class AstakosUser(User):
@extended_groups.setter
def extended_groups(self, groups):
#TODO exceptions
for name in groups:
for name in (groups or ()):
group = AstakosGroup.objects.get(name=name)
self.membership_set.create(group=group)
......@@ -803,7 +803,7 @@ def astakosuser_post_save(sender, instance, created, **kwargs):
set_default_group(instance)
# TODO handle socket.error & IOError
register_users((instance,))
instance.renew_token()
# instance.renew_token()
def resource_post_save(sender, instance, created, **kwargs):
......
......@@ -385,8 +385,9 @@ def signup(request, template_name='im/signup.html', on_success='im/signup_comple
logger.log(LOGGING_LEVEL, msg)
if user and user.is_active:
next = request.POST.get('next', '')
response = prepare_response(request, user, next=next)
transaction.commit()
return prepare_response(request, user, next=next)
return response
messages.add_message(request, status, message)
transaction.commit()
return render_response(on_success,
......
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