Backed out changeset 669b79e387c3

This commit is contained in:
Cédric Krier committed 2009-06-04 09:14:33 +02:00
1 parent 3b240300aa
commit e23c5ef3dd
1 file changed
+4 -8
+4 -8
View File
@@ -1981,14 +1981,10 @@ class ModelSQL(ModelStorage):
'WHERE id IN (' + ','.join(['%s' for x in child_ids]) + ')',
child_ids)
if parent_id is False:
cursor.execute('SELECT id FROM "' + self._table + '" WHERE "' +\
field_name + '" IS NULL')
else:
cursor.execute('SELECT id FROM "' + self._table + '" WHERE "' +\
field_name + '" = %s', (parent_id,))
brother_ids = [x[0] for x in cursor.fetchall()]
# Use root user to by-pass rules
brother_ids = self.search(cursor, 0, [
(field_name, '=', parent_id),
])
if brother_ids[-1] != object_id:
next_id = brother_ids[brother_ids.index(object_id) + 1]
cursor.execute('SELECT "' + left + '", "' + right + '" ' \