Changes between Initial Version and Version 3 of Ticket #25445


Ignore:
Timestamp:
Sep 22, 2015, 11:35:49 AM (9 years ago)
Author:
Clinton Christian
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25445

    • Property Summary `AttributeError` when `app_config` is missing attribute `models_module` in contenttypes/mananagent.py`AttributeError` when `app_config` is missing attribute `models_module` in contenttypes/management.py
    • Property Owner changed from nobody to Clinton Christian
    • Property Status newassigned
  • Ticket #25445 – Description

    initial v3  
    1 ```
     1
     2{{{
    23    if not app_config.models_module:
    34        return
    4 ```
     5}}}
    56
    6 The return statement is never reached since if app_config doesn't have a `models_module` attribute it raises an AttributeError.
    77
    8 Regardless of whether to allow the return statement to catch or return an AttributeError, this code should perhaps be changed to be more clear. I suggest either raising an AttributeError explicitly or using gettattr.
     8The return statement is never reached since if `app_config` doesn't have a `models_module` attribute it raises an `AttributeError`.
     9
     10Regardless of whether to allow the return statement to catch or return an `AttributeError`, this code should perhaps be changed to be more clear. I suggest either raising an `AttributeError` explicitly or using `gettattr`.
    911
    1012https://github.com/django/django/pull/5338
Back to Top