Commit 4dd1f4c5 authored by Markus Holtermann's avatar Markus Holtermann
Browse files

Explicitly checked for LookupError in contenttypes migration

parent e35c70be
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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()