diff --git a/django/contrib/contenttypes/management.py b/django/contrib/contenttypes/management.py
index 61ee285..8bbf065 100644
a
|
b
|
|
1 | 1 | from django.contrib.contenttypes.models import ContentType |
| 2 | from django.db import router |
2 | 3 | from django.db.models import get_apps, get_models, signals |
3 | 4 | from django.utils.encoding import smart_unicode |
4 | 5 | |
… |
… |
def update_contenttypes(app, created_models, verbosity=2, **kwargs):
|
8 | 9 | entries that no longer have a matching model class. |
9 | 10 | """ |
10 | 11 | db = kwargs['db'] |
| 12 | if not router.allow_syncdb(db, ContentType): |
| 13 | return |
| 14 | |
11 | 15 | ContentType.objects.clear_cache() |
12 | 16 | content_types = list(ContentType.objects.using(db).filter(app_label=app.__name__.split('.')[-2])) |
13 | 17 | app_models = get_models(app) |