@@ -0,0 +1,739 @@
+# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0A%0Adef fix_employment_groups(apps, schema_editor):%0A    # We can't import the Employment or Group model directly as it may be a%0A    # newer version than this migration expects. We use the historical version.%0A    Group = apps.get_model(%22auth%22, %22Group%22)%0A    Employment = apps.get_model(%22rsr%22, %22Employment%22)%0A    for employment in Employment.objects.filter(group=None):%0A        employment.group = Group.objects.get(name='Users')%0A        employment.save()%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A    dependencies = %5B%0A        ('rsr', '0086_auto_20160921_0947'),%0A    %5D%0A%0A    operations = %5B%0A        migrations.RunPython(fix_employment_groups),%0A    %5D%0A

Add a data migration to fix employments with no group