Fix write, unlink with just one id
This commit is contained in:
1 parent
f845b33256
commit
3324ddab32
1 file changed
+4
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user