Fix write, unlink with just one id

This commit is contained in:
Cédric Krier committed 2008-02-12 19:00:21 +01:00
1 parent f845b33256
commit 3324ddab32
1 file changed
+4
+4
View File
@@ -76,6 +76,8 @@ class ActionKeyword(OSV):
return res
def unlink(self, cursor, user, ids, context=None):
if isinstance(ids, (int, long)):
ids = [ids]
for keyword in self.browse(cursor, user, ids, context=context):
# Restart the cache view
try:
@@ -98,6 +100,8 @@ class ActionKeyword(OSV):
def write(self, cursor, user, ids, vals, context=None):
vals = self._convert_vals(cursor, user, vals, context=context)
if isinstance(ids, (int, long)):
ids = [ids]
for keyword in self.browse(cursor, user, ids, context=context):
# Restart the cache view
try: