Backed out changeset 669b79e387c3
This commit is contained in:
1 parent
3b240300aa
commit
e23c5ef3dd
1 file changed
+4
-8
@@ -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 + '" ' \
|
||||
|
||||
Reference in new issue
Block a user