When working with foreign keys, accessing the related field will result in a database read. That can be eliminated by using
*_id, which is the foreign key value that Django has already cached on the object to make this scenario more efficient.
If we spot this issue in your GitHub pull request we give this advice:
Django Doctor will run this check by default. No configuration is needed but the check can be turned on/off using check code
indirect-foreign-key in your pyproject.toml file.