Commit 8b5a9373 by Őry Máté

school: add to affiliation group

parent 349c50b8
......@@ -103,6 +103,13 @@ def login(request):
for a in affiliation:
g, created = AGroup.objects.get_or_create(name=a)
user.groups.add(g)
try:
g = Group.objects.filter(name=a)
g.members.add(p)
g.save()
messages.info(request, _('Course "%s" added.') % g.course)
except:
pass
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