Explicitly fetch a user profile in the account form pages.

Review Request #9617 — Created Feb. 10, 2018 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x
d1020f7...

Reviewers

ConfigPageForm in Djblets fetches a user profile up-front, which the
subclasses then use to access profile state. That functionality is
deprecated, as profiles are no longer a core part of Django. An upcoming
change will raise a DeprecationWarning any time self.profile is
accessed.

This change prepares for that by fetching the profile on-demand instead
of using the attribute lookup. Since profiles are cached, this won't
result in any extra database access.

Unit tests pass.

Manually tested loading and saving settings on the affected forms.

    Loading...