Opened 10 years ago

Closed 10 years ago

#7370 closed (fixed)

Changing user in admin deletes UserProfile

Reported by: Jesaja Everling Owned by: nobody
Component: contrib.admin Version: master
Severity: Keywords: UserProfile Admin User deletes
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by Ramiro Morales)

Hello everybody!

For me, changing a user in the admin interface, for example adding a first_name, deletes the corresponding UserProfile.
This doesn't happen when using the shell, only via the admin interface.
Both in current svn, and in 0.96.2.
I have created the UserProfile like so:

class UserProfile(models.Model):
    user = models.ForeignKey(User, unique=True, edit_inline=models.TABULAR, num_in_admin=1,min_num_in_admin=1, max_num_in_admin=1, num_extra_on_change=0, core=True)

AUTH_PROFILE_MODULE = 'myapp.UserProfile'

It works great, just changing a user in the admin interface deletes the UserProfile.
If this is in any way related to a wrong setup on my side, please excuse this ticket!

Best Regards!

Change History (4)

comment:1 Changed 10 years ago by Ramiro Morales

Description: modified (diff)

comment:2 Changed 10 years ago by chris.vigelius@…

Same thing here (current SVN). May very well be that this has been broken by the merge queryset-refactor, as I remember this having worked before.

However, given the fact that nfa is expected to land pretty soon, and since there is an obvious workaround (remove inline editing from the model definition) which does not break anything but only causes some inconvenience (you can still edit the profile via admin, just not inline), I doubt whether it is really effective to spend much time on this issue.

comment:3 Changed 10 years ago by anonymous

Do any of your other fields have "core=True"?

If not, add core=true to some or allyour userprofile fields and try again.

comment:4 Changed 10 years ago by James Turk

Resolution: fixed
Status: newclosed

this bug does not apply to newforms-admin

Note: See TracTickets for help on using tickets.
Back to Top