Commit 55d80b6c by Őry Máté

one: fix affiliation groups

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