1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #31185 -- Fixed detecting of unique fields in ForeignKey/ForeignObject checks when using Meta.constraints.

This commit is contained in:
Valze
2020-02-19 23:57:16 +02:00
committed by Mariusz Felisiak
parent 41ebe60728
commit 5bf28ac2ed
3 changed files with 151 additions and 12 deletions

View File

@@ -220,7 +220,7 @@ Related fields
``'__'``.
* **fields.E310**: No subset of the fields ``<field1>``, ``<field2>``, ... on
model ``<model>`` is unique.
* **fields.E311**: ``<model>`` must set ``unique=True`` because it is
* **fields.E311**: ``<model>.<field name>`` must be unique because it is
referenced by a ``ForeignKey``.
* **fields.E312**: The ``to_field`` ``<field name>`` doesn't exist on the
related model ``<app label>.<model>``.