Skip to content

Commit

Permalink
Merge pull request #102 from SRJ9/SRJ9/m2m-apply
Browse files Browse the repository at this point in the history
passing m2m param to api.merge in apply step
  • Loading branch information
saxix committed Jan 10, 2017
2 parents e50e74d + 734d30b commit 291d8cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/adminactions/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,12 @@ def raw_widget(field, **kwargs):
if ok:
if form.cleaned_data['dependencies'] == MergeForm.DEP_MOVE:
related = api.ALL_FIELDS
m2m = api.ALL_FIELDS
else:
related = None
m2m = None
fields = form.cleaned_data['field_names']
api.merge(master, other, fields=fields, commit=True, related=related)
api.merge(master, other, fields=fields, commit=True, m2m=m2m, related=related)
return HttpResponseRedirect(request.path)
else:
messages.error(request, form.errors)
Expand Down

0 comments on commit 291d8cb

Please sign in to comment.