Skip to content
Snippets Groups Projects
Unverified Commit 2fe1947f authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Fix assignment of n:m field.

parent b41be58a
No related branches found
No related tags found
No related merge requests found
......@@ -72,8 +72,8 @@ def untis_import_xml(request, untis_xml):
'name': name})
try:
class_.owners = [Person.objects.get(
short_name=class_teacher_short_name)]
class_.owners.set([Person.objects.get(
short_name=class_teacher_short_name)])
class_.save()
except Person.DoesNotExist:
messages.warning(request, _('Could not set class teacher of %s to %s.') % (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment