Commit fb18c1bc by Őry Máté

school: do not automatically create attended courses

fixes #33
parent 859cabd7
......@@ -55,9 +55,10 @@ def login(request):
else:
attended = attended.split(';')
for c in attended:
co, created = Course.objects.get_or_create(code=c)
if created:
logger.warning("django Course %s created" % c)
try:
co = Course.objects.get(code=c)
except:
continue
g = co.get_or_create_default_group()
if p.course_groups.filter(semester=sem, course=co).count() == 0:
try:
......
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