projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b6970e
)
Document: fix creating of empty files.
author
P. Christeas
<p_christ@hol.gr>
Wed, 23 Jun 2010 14:07:09 +0000
(17:07 +0300)
committer
P. Christeas
<p_christ@hol.gr>
Wed, 23 Jun 2010 14:07:09 +0000
(17:07 +0300)
For an empty file, the interface (eg. webdav) could ask to create with
data=None. Allow that.
bzr revid: p_christ@hol.gr-
20100623140709
-m11r40kk2dl9okvo
addons/document/nodes.py
patch
|
blob
|
history
diff --git
a/addons/document/nodes.py
b/addons/document/nodes.py
index
df1878a
..
299e2a8
100644
(file)
--- a/
addons/document/nodes.py
+++ b/
addons/document/nodes.py
@@
-339,7
+339,8
@@
class node_dir(node_database):
fil_id = fil_obj.create(cr, uid, val, context=ctx)
fil = fil_obj.browse(cr, uid, fil_id, context=ctx)
fnode = node_file(path, self, self.context, fil)
- fnode.set_data(cr, data, fil)
+ if data is not None:
+ fnode.set_data(cr, data, fil)
return fnode
def get_etag(self, cr):