summaryrefslogtreecommitdiff
path: root/pgweb/util/helpers.py
diff options
context:
space:
mode:
authorMagnus Hagander2017-12-11 14:29:45 +0000
committerMagnus Hagander2017-12-11 14:29:45 +0000
commit4ed0ca0fbe36dc252d40e94456890a8bb6cdf776 (patch)
tree6ba000810d2e1648379a6d12215b35133e61601c /pgweb/util/helpers.py
parente37ee54d257e588f78bcdd7577a7027bd764f138 (diff)
Fix submission forms for many2many fields with checkboxes
This includes proper styling (no more centering of the checkbox itself) and actually saving the m2m fields on submit.
Diffstat (limited to 'pgweb/util/helpers.py')
-rw-r--r--pgweb/util/helpers.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pgweb/util/helpers.py b/pgweb/util/helpers.py
index 87e586ce..b24885bf 100644
--- a/pgweb/util/helpers.py
+++ b/pgweb/util/helpers.py
@@ -43,6 +43,8 @@ def simple_form(instancetype, itemid, request, formclass, formtemplate='base/for
form.apply_submitter(r, request.user)
r.save()
+ form.save_m2m()
+
return HttpResponseRedirect(redirect)
else:
# Generate form