Opened 16 years ago
Closed 16 years ago
#7370 closed (fixed)
Changing user in admin deletes UserProfile
Reported by: | Jesaja Everling | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
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: | no | UI/UX: | no |
Description (last modified by )
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:
models.py:
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)
settings.py:
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 by , 16 years ago
Description: | modified (diff) |
---|
comment:2 by , 16 years ago
comment:3 by , 16 years ago
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 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
this bug does not apply to newforms-admin
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.