mirror of
https://github.com/django/django.git
synced 2025-02-07 16:05:34 +00:00
b39aabc6c6
As CharField.to_python() now always calls str(), assigning bytes to a CharField is no longer correct usage. Doing so results in a warning: django/db/models/fields/__init__.py:1061: BytesWarning: str() on a bytes instance Use a unique constraint violation to trigger the database error instead. Warning introduced in 301de774c21d055e9e5a7073e5bffdb52bc71079.