Permalink
Browse files

[FIX] write/unlink if ids is int, change to list

  • Loading branch information...
1 parent f05d644 commit f7459b544a4dbf906a8dd145a39b809b27b92a6b resteve committed May 4, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 ooop.py
View
@@ -192,7 +192,7 @@ def unlink(self, model, ids):
""" remove register """
if self.debug:
print "DEBUG [unlink]:", model, ids
- if not type(ids) == 'list':
+ if isinstance(ids, int):
ids = [ids]
if self.protocol == 'pyro':
result = self.proxy.dispatch( 'object', 'execute', self.dbname, self.uid, self.pwd, model, 'unlink', ids)
@@ -205,7 +205,7 @@ def write(self, model, ids, value):
context = {'lang':self.lang}
if self.debug:
print "DEBUG [write]:", model, ids, value
- if not type(ids) == 'list':
+ if isinstance(ids, int):
ids = [ids]
if self.protocol == 'pyro':
result = self.proxy.dispatch( 'object', 'execute', self.dbname, self.uid, self.pwd, model, 'write', ids, value, context)

0 comments on commit f7459b5

Please sign in to comment.