summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAntoine Catton <acatton@fusionbox.com>2015-10-09 10:55:19 -0600
committerTim Graham <timograham@gmail.com>2015-10-14 05:26:42 -0700
commit38d6e1e2ada93e5d8c672ba18f1f8e3cd6c5ca76 (patch)
treeae3d19dfe9a42e1eaec5e5cea2c4959ba564e0a4 /docs
parentaa0a3b680eb7e6a29ae004fcf229d288a702d89e (diff)
[1.9.x] Fixed #25535 -- Made ForeignObject checks less strict.
Check that the foreign object `from_fields` are a subset of any unique constraints on the foreign model. Backport of 80dac8c33e7f6f22577e4346f44e4c5ee89b648c and c7aff31397a7228f6ac2e33c10ebdf36c4b7a9b7 from master
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/checks.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/ref/checks.txt b/docs/ref/checks.txt
index 208e3fb81f..3cd68a43c8 100644
--- a/docs/ref/checks.txt
+++ b/docs/ref/checks.txt
@@ -189,8 +189,9 @@ Related Fields
for ``<field name>``.
* **fields.E306**: Related name must be a valid Python identifier or end with
a ``'+'``.
-* **fields.E310**: None of the fields ``<field1>``, ``<field2>``, ... on model
- ``<model>`` have a ``unique=True`` constraint.
+* **fields.E310**: No subset of the fields ``<field1>``, ``<field2>``, ... on
+ model ``<model>`` is unique. Add ``unique=True`` on any of those fields or
+ add at least a subset of them to a unique_together constraint.
* **fields.E311**: ``<model>`` must set ``unique=True`` because it is
referenced by a ``ForeignKey``.
* **fields.E320**: Field specifies ``on_delete=SET_NULL``, but cannot be null.