Sunday, August 31, 2014

Re: Can not add a group to a custom auth user

super(Merchant, self).save(force_insert=True) 

solved the problem!


On Monday, September 1, 2014 2:15:22 PM UTC+8, Ikaros andi wrote:
I debug into save method and find:

ValueError: "<Merchant: m23533>" needs to have a value for field "user" before this many-to-many relationship can be used.

Merchant have already been super saved. I can figure it out




On Wednesday, August 27, 2014 10:08:15 PM UTC+8, Collin Anderson wrote:
i assume "groups" is an editable field in the admin.

after the admin calls merchant.save(), it then clears out and re-assigns the value of groups based on the data in the input field.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f746f39e-1933-4c64-bc10-f1516da803d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment