Commit 3f19500c authored by vovanz's avatar vovanz

FileUploadInput fix

If you edit a model where file field is required you will get a validation error if file field is set but wasn't changed.
You should pass filename in form data if it is already set.
parent 4050be5c
...@@ -54,7 +54,8 @@ class FileUploadInput(object): ...@@ -54,7 +54,8 @@ class FileUploadInput(object):
return HTMLString(template % { return HTMLString(template % {
'text': html_params(type='text', 'text': html_params(type='text',
readonly='readonly', readonly='readonly',
value=field.data), value=field.data,
name=field.name),
'file': html_params(type='file', 'file': html_params(type='file',
**kwargs), **kwargs),
'marker': '_%s-delete' % field.name 'marker': '_%s-delete' % field.name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment