Loading django/contrib/contenttypes/migrations/0002_remove_content_type_name.py +1 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ def add_legacy_name(apps, schema_editor): for ct in ContentType.objects.all(): try: ct.name = apps.get_model(ct.app_label, ct.model)._meta.object_name except: except LookupError: ct.name = ct.model ct.save() Loading Loading
django/contrib/contenttypes/migrations/0002_remove_content_type_name.py +1 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ def add_legacy_name(apps, schema_editor): for ct in ContentType.objects.all(): try: ct.name = apps.get_model(ct.app_label, ct.model)._meta.object_name except: except LookupError: ct.name = ct.model ct.save() Loading