summaryrefslogtreecommitdiff
path: root/postgresqleu/util/backendviews.py
diff options
context:
space:
mode:
authorMagnus Hagander2019-01-15 12:36:30 +0000
committerMagnus Hagander2019-01-15 12:36:30 +0000
commitfe9ae17488506984800ed48ae7bda810b4d5efde (patch)
treee6d3f8b190fa52185d7fa709cd44ab0d30ac4fa1 /postgresqleu/util/backendviews.py
parent319ed60cf0ce7fdf0a5ad1d8698e9291da09d576 (diff)
Don't try to save readonly fields
normally they would be unchanged, but by not even trying to save them, we can also get away with not specifying them.
Diffstat (limited to 'postgresqleu/util/backendviews.py')
-rw-r--r--postgresqleu/util/backendviews.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/postgresqleu/util/backendviews.py b/postgresqleu/util/backendviews.py
index c1db3c68..4ea13150 100644
--- a/postgresqleu/util/backendviews.py
+++ b/postgresqleu/util/backendviews.py
@@ -139,7 +139,7 @@ def backend_process_form(request, urlname, formclass, id, cancel_url='../', save
for f in form.file_fields:
if f in request.FILES:
setattr(form.instance, f, request.FILES[f])
- all_excludes = ['_validator', '_newformdata']
+ all_excludes = ['_validator', '_newformdata'] + form.readonly_fields
if form.json_form_fields:
for fn, ffields in form.json_form_fields.items():
all_excludes.extend(ffields)