Skip to content

Commit

Permalink
Refs #9475 -- Simplified dictionary unpacking.
Browse files Browse the repository at this point in the history
  • Loading branch information
charettes authored and timgraham committed Jan 16, 2019
1 parent d212bc0 commit dbcf2ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/db/models/fields/related_descriptors.py
Expand Up @@ -1105,10 +1105,10 @@ def _add_items(self, source_field_name, target_field_name, *objs, through_defaul

# 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
])

Expand Down

0 comments on commit dbcf2ff

Please sign in to comment.