Ticket #15932: m2m_validation.patch
File m2m_validation.patch, 847 bytes (added by , 14 years ago) |
---|
-
django/core/management/validation.py
249 249 # occurs for symmetrical m2m relations to self). If this is the 250 250 # case, there are no clashes to check for this field, as there are 251 251 # no reverse descriptors for this field. 252 if rel_name is not None :252 if rel_name is not None and not f.rel.is_hidden(): 253 253 for r in rel_opts.fields: 254 254 if r.name == rel_name: 255 255 e.add(opts, "Accessor for m2m field '%s' clashes with field '%s.%s'. Add a related_name argument to the definition for '%s'." % (f.name, rel_opts.object_name, r.name, f.name))