Ticket #8687: m2m_through_regress-validation.diff

File m2m_through_regress-validation.diff, 970 bytes (added by vung, 16 years ago)
  • django/core/management/validation.py

     
    131131                        else:
    132132                            if rel_to == from_model:
    133133                                if seen_from:
    134                                     e.add(opts, "Intermediary model %s has more than one foreign key to %s, which is ambiguous and is not permitted." % (f.rel.through_model._meta.object_name, rel_from._meta.object_name))
     134                                    e.add(opts, "Intermediary model %s has more than one foreign key to %s, which is ambiguous and is not permitted." % (f.rel.through_model._meta.object_name, from_model._meta.object_name))
    135135                                else:
    136136                                    seen_from = True
    137137                            elif rel_to == to_model:
Back to Top