Update migration again
This commit is contained in:
parent
da7adcbb4c
commit
fdd35301d9
|
|
@ -5,10 +5,11 @@ from django.db import migrations
|
|||
|
||||
def set_default_school_class(apps, schema_editor):
|
||||
Project = apps.get_model('portfolio', 'Project')
|
||||
User = apps.get_model('user', 'User')
|
||||
projects = Project.objects.all()
|
||||
bulk_projects = []
|
||||
for project in projects:
|
||||
owner = project.student
|
||||
owner = User.objects.get(id=project.student.id)
|
||||
selected_class = owner._get_selected_class()
|
||||
if selected_class is not None:
|
||||
project.school_class = selected_class
|
||||
|
|
|
|||
Loading…
Reference in New Issue