From 0b655a4bf81f640d3e664f398e635943d4fb7812 Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Thu, 30 Jul 2020 15:19:00 +0500 Subject: [PATCH] Removed unnecessary list() call in RelatedManager.add(). --- django/db/models/fields/related_descriptors.py | 1 - 1 file changed, 1 deletion(-) diff --git a/django/db/models/fields/related_descriptors.py b/django/db/models/fields/related_descriptors.py index 20f247c603..7ade10ca6e 100644 --- a/django/db/models/fields/related_descriptors.py +++ b/django/db/models/fields/related_descriptors.py @@ -641,7 +641,6 @@ def create_reverse_many_to_one_manager(superclass, rel): def add(self, *objs, bulk=True): self._remove_prefetched_objects() - objs = list(objs) db = router.db_for_write(self.model, instance=self.instance) def check_and_update_obj(obj):