You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I user your Mixins, the password field is updated as a regular character field directly on the model, both on create() and update() (which is obvious).
For update(), I thought I could write my own update logic for password and then call super() like so:
but I'm getting an UniqueViolation error for the email field (it has an unique constraint, for obvious reasons). It's curious that my update() method is not even being called.
Even if the update() solution can be tweaked to work, I can't think of any solution for create().
Is there a way to solve this issue?
The text was updated successfully, but these errors were encountered:
I have a custom
User
model withcreate_user
method onUser.objects
, in an implementation similar to one shown here:https://docs.djangoproject.com/en/3.0/topics/auth/customizing/#a-full-example
If I user your Mixins, the
password
field is updated as a regular character field directly on the model, both oncreate()
andupdate()
(which is obvious).For
update()
, I thought I could write my own update logic for password and then callsuper()
like so:but I'm getting an
UniqueViolation
error for theemail
field (it has an unique constraint, for obvious reasons). It's curious that myupdate()
method is not even being called.Even if the
update()
solution can be tweaked to work, I can't think of any solution forcreate()
.Is there a way to solve this issue?
The text was updated successfully, but these errors were encountered: