mirror of
https://github.com/yweber/lodel2.git
synced 2026-03-09 13:12:02 +01:00
Component.new_rank() correction
same as precedent
This commit is contained in:
parent
350d15cba9
commit
79268ca418
1 changed files with 1 additions and 1 deletions
|
|
@ -165,7 +165,7 @@ class EmComponent(object):
|
||||||
component = sql.Table(self.table, sqlutils.meta(dbe))
|
component = sql.Table(self.table, sqlutils.meta(dbe))
|
||||||
req = sql.sql.select([component.c.uid, component.c.rank])
|
req = sql.sql.select([component.c.uid, component.c.rank])
|
||||||
if(sign == '='):
|
if(sign == '='):
|
||||||
req = req.where(getattr(component.c, self.ranked_in) == self.ranked_in and component.c.rank == new_rank - 1)
|
req = req.where(getattr(component.c, self.ranked_in) == self.ranked_in and component.c.rank == new_rank)
|
||||||
c = dbe.connect()
|
c = dbe.connect()
|
||||||
res = c.execute(req)
|
res = c.execute(req)
|
||||||
res = res.fetchone()
|
res = res.fetchone()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue