Changes between Initial Version and Version 1 of Ticket #28594
- Timestamp:
- Sep 13, 2017, 3:22:09 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28594 – Description
initial v1 1 1 problem: 2 While upgrading from 1.9 to 1.11, ForwardManyToOneDescriptor.__set__() 3 tries to assign a string (description of the related instance) to the related user name field 4 of user model. 2 While upgrading from 1.9 to 1.11, `ForwardManyToOneDescriptor.__set__()` tries to assign a string (description of the related instance) to the related user name field of user model. 5 3 diagnosis: 6 In 1.10 normalize_username(), a class method of AbstractBaseUser, has been introduced. 7 This class method forces the related user name instance to a string. 4 In 1.10 `normalize_username()`, a class method of `AbstractBaseUser`, has been introduced. This class method forces the related user name instance to a string. 8 5 Fix: 9 6 Overwriting this with a method which just returns the 'username' fixes the problem. 10 7 11 8 Details: 12 9 {{{ 13 10 class AbstractEmailUser(AbstractBaseUser, PermissionsMixin, FieldlistForDetailTemplateMixin): 14 11 localemail = models.OneToOneField('Mailbox', verbose_name=_('Local E-mail'), … … 86 83 ValueError: Cannot assign "'unpriv@framailx.de'": "Account.localemail" must be a "Mailbox" instance. 87 84 [21/Aug/2017 16:08:37] "POST /admin/erdb/account/19/change/ HTTP/1.1" 500 166385 88 85 }}} 89 86 Discussion: 90 87 https://www.mail-archive.com/django-users@googlegroups.com/msg178769.html