Update Profile caching to use get_object_cached_field.

Review Request #14328 — Created Feb. 4, 2025 and submitted

Information

Review Board
release-7.1.x

Reviewers

Djblets received a new function for fetching related objects from a
select_related() or prefetch_related() cache, which can simplify a
lot of code. One of the core tests for this was converting our somewhat
complex User.get_profile() cache logic to use that.

This change moves this method over to that, simplifying the function a
bit and helping ensure that functionality continues to work as expected.

Unit tests pass.

Summary ID
Update Profile caching to use get_object_cached_field.
Djblets received a new function for fetching related objects from a `select_related()` or `prefetch_related()` cache, which can simplify a lot of code. One of the core tests for this was converting our somewhat complex `User.get_profile()` cache logic to use that. This change moves this method over to that, simplifying the function a bit and helping ensure that functionality continues to work as expected.
fe05a0110f55765a82e7b2ff59aa0a13d27515a1
Description From Last Updated

'djblets.util.symbols.Unsettable' imported but unused Column: 5 Error code: F401

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
david
  1. Ship It!
  2. 
      
maubin
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-7.1.x (a77fca3)