mirror of
https://github.com/django/django.git
synced 2025-10-28 16:16:12 +00:00
Replaced Model._get_pk_val() with pk property.
Model.pk was added after _get_pk_val() and many places weren't simplified.
This commit is contained in:
@@ -583,7 +583,7 @@ class QuerySet:
|
||||
qs = self.filter(pk__in=id_list).order_by()
|
||||
else:
|
||||
qs = self._clone()
|
||||
return {obj._get_pk_val(): obj for obj in qs}
|
||||
return {obj.pk: obj for obj in qs}
|
||||
|
||||
def delete(self):
|
||||
"""Delete the records in the current QuerySet."""
|
||||
|
||||
Reference in New Issue
Block a user