Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix phonenumber Django 1.6/Python 3 unicode bug
Django calls force_text on PhoneNumber instances when populating a model form. Django 1.6's force_text implementation unfortunately checks for __unicode__, which is defined in the base class. As we're using the python_2_unicode_compatible decorator, in Python 2 __unicode__ is already overwritten by the decorator. In Python 3, we can safely return __str__ because it returns unicode. This was discovered by @itbabu in #1645.
- Loading branch information