commit d1b80c597fb2d539eca533434e7032dec2c16b90
Author: Emmanuelle Delescolle <emma@lasolution.be>
Date: Sun Oct 5 16:05:41 2014 +0200
fix
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
index 6edae7a..61a17cb 100644
a
|
b
|
class BaseModelAdmin(six.with_metaclass(forms.MediaDefiningClass)):
|
466 | 466 | related_object.field.rel.get_related_field() == field): |
467 | 467 | return True |
468 | 468 | |
| 469 | # Check whether this model is the origin of a M2M relationship |
| 470 | # in which case to_field has to be the pk on this model |
| 471 | if len(opts.many_to_many) and field == opts.pk: |
| 472 | return True |
| 473 | |
| 474 | |
469 | 475 | return False |
470 | 476 | |
471 | 477 | def has_add_permission(self, request): |