diff --git a/server/core/management/commands/data/user_data.py b/server/core/management/commands/data/user_data.py index c0d092fc..7cfec2bd 100644 --- a/server/core/management/commands/data/user_data.py +++ b/server/core/management/commands/data/user_data.py @@ -2,6 +2,7 @@ user_data = [ { 'teacher': ('Nico', 'Zickgraf',), 'class': 'FLID2018a', + 'code': 'XXXX', 'students': [ ('Robin', 'Abbühl'), ('Zeynep', 'Catal'), @@ -15,12 +16,13 @@ user_data = [ ('Kelly', 'To'), ('Deborah', 'Waldmeier'), ('Rahel', 'Weiss'), - ('Nora', 'Zimmermann'), + ('Cindy', 'Zimmermann'), ] }, { 'teacher': ('Michael', 'Gurtner',), 'class': 'KF1A', + 'code': 'YYYY', 'students': [ ('Lisa', 'Arn'), ('Machado', 'Fernandes'), diff --git a/server/users/services.py b/server/users/services.py index efc0f011..b76353eb 100644 --- a/server/users/services.py +++ b/server/users/services.py @@ -21,7 +21,7 @@ def create_users(data=None): SchoolClassFactory( users=[teacher] + students, - name='skillbox' + name='skillbox', ) teacher2 = UserFactory(username='teacher2') UserRole.objects.create(user=teacher2, role=teacher_role) @@ -57,4 +57,5 @@ def create_users(data=None): SchoolClassFactory( users=students + [teacher], name=school_class.get('class'), + code=school_class.get('code', '') )