Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#8344 closed (fixed)

contrib.auth.models.User.get_profile() throws AttributeError not SiteProfileNotAvailable

Reported by: jezdez Owned by: jezdez
Component: contrib.auth Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

On line line 289 it checks if settings.AUTH_PROFILE_MODULE is set. This throws an AttributeError instead of the SiteProfileNotAvailable exception, if the setting is not given.

The attached patch fixes the issue.

Attachments (1)

get_profile.r8366.diff (597 bytes) - added by jezdez 6 years ago.
initial patch to fix get_profile()

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by jezdez

initial patch to fix get_profile()

comment:1 Changed 6 years ago by jezdez

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to jezdez
  • Patch needs improvement unset

comment:2 Changed 6 years ago by mtredinnick

  • milestone set to 1.0
  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 6 years ago by jacob

  • Resolution set to fixed
  • Status changed from new to closed

(In [8543]) Fixed #8344: make User.get_profile() work when settings.AUTH_PROFILE_MODULE is unset.

comment:4 Changed 3 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.