Django migration fails with “__fake__.DoesNotExist: Permission matching query does not exist.”
问题 In a Django 1.8 project, I have a migration that worked fine, when it had the following code: # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.conf import settings def update_site_forward(apps, schema_editor): """Add group osmaxx.""" Group = apps.get_model("auth", "Group") Group.objects.create(name=settings.OSMAXX_FRONTEND_USER_GROUP) def update_site_backward(apps, schema_editor): """Revert add group osmaxx.""" Group = apps.get_model