Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid returning None from get_field_related_model_cls
#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.
- Loading branch information