diff options
| author | Matheus Cunha Motta <sqrtomath@gmail.com> | 2020-02-26 15:08:55 -0300 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-02-28 08:38:57 +0100 |
| commit | e908eb62871f0b0aac63afa6601bf222bc2a1a7d (patch) | |
| tree | 34e86fecffb9be36411ee279eae0d9e3ed9b97ec /django | |
| parent | 308fab924195bdea2fc481e1466c3c3894c03400 (diff) | |
Fixed #31310 -- Fixed hints in checks for using intermediate model with ambiguous foreign key.
symmetrical=False is not required since
87b1ad6e7351464c60e751b483d9dfce3a2d3382.
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/models/fields/related.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py index 8ddbb5ba68..536b3dd601 100644 --- a/django/db/models/fields/related.py +++ b/django/db/models/fields/related.py @@ -1309,7 +1309,7 @@ class ManyToManyField(RelatedField): "through_fields keyword argument.") % (self, from_model_name), hint=( 'If you want to create a recursive relationship, ' - 'use ForeignKey("%s", symmetrical=False, through="%s").' + 'use ManyToManyField("%s", through="%s").' ) % ( RECURSIVE_RELATIONSHIP_CONSTANT, relationship_model_name, @@ -1329,7 +1329,7 @@ class ManyToManyField(RelatedField): "through_fields keyword argument." % (self, to_model_name), hint=( 'If you want to create a recursive relationship, ' - 'use ForeignKey("%s", symmetrical=False, through="%s").' + 'use ManyToManyField("%s", through="%s").' ) % ( RECURSIVE_RELATIONSHIP_CONSTANT, relationship_model_name, |
