mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-24 09:28:42 -06:00
[FIX] cope with empty ids
This commit is contained in:
parent
e6434b12a5
commit
bbcf0c0d49
@ -34,6 +34,9 @@ class IrAttachment(Model):
|
|||||||
cr, uid,
|
cr, uid,
|
||||||
ids if isinstance(ids, collections.Iterable) else [ids],
|
ids if isinstance(ids, collections.Iterable) else [ids],
|
||||||
context=context):
|
context=context):
|
||||||
|
if not this.id:
|
||||||
|
result[this.id] = False
|
||||||
|
continue
|
||||||
extension = ''
|
extension = ''
|
||||||
if this.datas_fname:
|
if this.datas_fname:
|
||||||
filename, extension = os.path.splitext(this.datas_fname)
|
filename, extension = os.path.splitext(this.datas_fname)
|
||||||
|
Loading…
Reference in New Issue
Block a user