Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid returning None from get_field_related_model_cls #1956

Commits on Feb 25, 2024

  1. Avoid returning None from get_field_related_model_cls

    typeddjango#1495 updated
    `get_field_related_model_cls` to raise `UnregisteredModelError` rather
    than returning `None` for failure paths. However, None can still be
    returned if the initial retrieval of `related_model_cls` returns None.
    
    This patch adds a check to see if the initial retrieval has got a `None`
    and then raises the appropriate error rather than letting `None` be
    returned.
    SingingTree committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    23b6aa3 View commit details
    Browse the repository at this point in the history