Browse Source

Refs #9475 -- Simplified dictionary unpacking.

Simon Charette 6 years ago
parent
commit
dbcf2ffa77
1 changed files with 2 additions and 2 deletions
  1. 2 2
      django/db/models/fields/related_descriptors.py

+ 2 - 2
django/db/models/fields/related_descriptors.py

@@ -1105,10 +1105,10 @@ def create_forward_many_to_many_manager(superclass, rel, reverse):
 
                     # Add the ones that aren't there already
                     self.through._default_manager.using(db).bulk_create([
-                        self.through(**{**through_defaults, **{
+                        self.through(**through_defaults, **{
                             '%s_id' % source_field_name: self.related_val[0],
                             '%s_id' % target_field_name: obj_id,
-                        }})
+                        })
                         for obj_id in new_ids
                     ])