7 | | This is because, when processing app2 - in update_contenttypes (contenttypes/manangement.py) first gets all current contenttypes for app1 (\ |
8 | | because the query ContentType.objects.filter(app_label=app.__name__.split('.')[-2]) returns all the rows for app1 and app2) |
9 | | and then after inserting all the objects for app2 (which are not present there) - it deletes all the previous objects inserted for app1 because it thinks they're 'stale' (they weren't part of get_models(app2)) |
| 9 | This is because, when processing app2 - in update_contenttypes (`contenttypes/manangement.py`) first gets all current contenttypes for app1 (because the query `ContentType.objects.filter(app_label=app.__name__.split('.')[-2])` returns all the rows for app1 and app2) |
| 10 | and then after inserting all the objects for app2 (which are not present there) - it deletes all the previous objects inserted for app1 because it thinks they're 'stale' (they weren't part of `get_models(app2)`) |