diff options
| author | Diederik van der Boor <vdboor@edoburu.nl> | 2013-05-18 17:27:12 +0200 |
|---|---|---|
| committer | Diederik van der Boor <vdboor@edoburu.nl> | 2013-05-18 17:31:28 +0200 |
| commit | 86e761fee88a8bf0499f6795c9a9b336d7c52873 (patch) | |
| tree | 7e23a58a9bd5c9b630c9ae74e209033a01a99082 /tests/admin_scripts | |
| parent | 96cabba80805ddda9c48307cb3d75177dc94ba29 (diff) | |
Fix NoneType error when fetching a stale ContentType with get_for_id
When a stale ContentType is fetched, the _add_to_cache() function
didn't detect that `model_class()` returns `None` (which it does by
design). However, the `app_label` + `model` fields can be used instead
to as local cache key. Third party apps can detect stale models by
checking whether `model_class()` returns `None`.
Ticket: https://code.djangoproject.com/ticket/20442
Diffstat (limited to 'tests/admin_scripts')
0 files changed, 0 insertions, 0 deletions
