Commit 55d80b6c by Őry Máté

one: fix affiliation groups

parent 00e235c7
......@@ -108,12 +108,12 @@ def login(request):
g, created = AGroup.objects.get_or_create(name=a)
user.groups.add(g)
try:
g = Group.objects.filter(name=a)
g = Group.objects.filter(name=a)[0]
g.members.add(p)
g.save()
logger.warning("Django affiliation %s added to %s" % (a, p))
except:
logger.warning("Django FAIL affiliation %s added to %s" % (a, p))
logger.warning("Django affiliation group %s added to %s" % (a, p))
except e as Exception:
logger.warning("Django FAIL affiliation group %s added to %s %s" % (a, p, e))
user.save()
p.save()
......
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 sign in to comment