summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/contrib/admin/checks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/admin/checks.py b/django/contrib/admin/checks.py
index 10d33b06f8..dbbeb7fe9c 100644
--- a/django/contrib/admin/checks.py
+++ b/django/contrib/admin/checks.py
@@ -1130,7 +1130,7 @@ class ModelAdminChecks(BaseModelAdminChecks):
id="admin.E124",
)
]
- elif not field.editable:
+ elif not field.editable or field.primary_key:
return [
checks.Error(
"The value of '%s' refers to '%s', which is not editable "