                      id='fields.E331',
                  )
              )
  
          elif self.rel.through_fields is not None:
              if not len(self.rel.through_fields) >= 2 or not (self.rel.through_fields[0] and self.rel.through_fields[1]):
                  errors.append(
                      checks.Error(
                          ("The field is given an iterable for through_fields, "
                           "which does not provide the names for both link fields "
                           "that Django should use for the relation through model "
                           "'%s'.") % qualified_model_name,
                          hint=None,
                          obj=self,
                          id='fields.E337',
                      )
                  )
  
          elif not isinstance(self.rel.through, six.string_types):
  
              assert from_model is not None, \
                  "ManyToManyField with intermediate " \
                  "tables cannot be checked if you don't pass the model " \
                  "where the field is attached to."
 
</s> remove                 ("The field is given an iterable for through_fields, "
                 "which does not provide the names for both link fields "
                 "that Django should use for the relation through model "
                 "'invalid_models_tests.Invitation'."),
                hint=None,
 </s> add                 ("Field specifies 'through_fields' but does not provide the names "
                 "of the two link fields that should be used for the relation "
                 "through model 'invalid_models_tests.Invitation'."),
                hint=("Make sure you specify 'through_fields' as "
                      "through_fields=('field1', 'field2')"), </s> remove * **fields.E337**: The field is given an iterable for through_fields, which does not provide the names for both link fields that Django should use for the relation through <model>.
 </s> add * **fields.E337**: Field specifies ``through_fields`` but does not provide the names of the two link fields that should be used for the relation through ``<model>``.
* **fields.E338**: The intermediary model ``<through model>`` has no field ``<field name>``.
* **fields.E339**: ``<model>.<field name>`` is not a foreign key to ``<model>``. </s> remove         # We only reach here if we're given an invalid field name via the
        # `through_fields` argument
        raise FieldDoesNotExist(link_field_name)
 </s> add  </s> remove   to the target model (this would be ``Person`` in our example), or you must
 </s> add   to the source model (this would be ``Group`` in our example), or you must </s> remove   to the foreign key to the source model (this would be ``Group`` in our
 </s> add   to the foreign key to the target model (this would be ``Person`` in our
        else:
                      id='fields.E331',
                  )
              )
  
        else:
        else:
        else:
        else:
        else:
        else:
        else:
        else:
        else:
        else:
        else:
        else:
        else:
        else:
        else:
  
              assert from_model is not None, \
                  "ManyToManyField with intermediate " \
                  "tables cannot be checked if you don't pass the model " \
                  "where the field is attached to."
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Fixed #22217 - ManyToManyField.through_fields fixes.

- Docs description of arguments mix up.
- Keep it from erroneously masking E332 check.
- Add checks E338 and E339, tweak message of E337. 
django/db/models/fields/related.py