better check for auto-upload

This commit is contained in:
Massimo Di Pierro
2012-05-03 21:00:41 -05:00
parent 712ef6499f
commit be86c1e8ea
2 changed files with 2 additions and 2 deletions

View File

@@ -1 +1 @@
Version 1.99.7 (2012-05-03 20:51:25) dev
Version 1.99.7 (2012-05-03 21:00:21) dev

View File

@@ -7245,7 +7245,7 @@ class Table(dict):
for field in self:
if field.type=='upload' and field.name in fields:
value = fields[field.name]
if not isinstance(value,str):
if value and not isinstance(value,str):
if hasattr(value,'file') and hasattr(value,'filename'):
new_name = field.store(value.file,filename=value.filename)
elif hasattr(value,'read') and hasattr(value,'name'):