Add check for empty ids in delete

This commit is contained in:
Cédric Krier committed 2008-09-19 17:20:26 +02:00
1 parent 8b5902a8e1
commit 595b010c88
1 file changed
+2
+2
View File
@@ -962,6 +962,8 @@ class Invoice(OSV):
return res
def delete(self, cursor, user, ids, context=None):
if not ids:
return True
if isinstance(ids, (int, long)):
ids = [ids]
self.check_modify(cursor, user, ids, context=context)