1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2026-03-09 21:22:01 +01:00

Component.new_rank() correction

same as precedent
This commit is contained in:
Driky 2015-06-12 11:44:54 +02:00
commit 79268ca418

View file

@ -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()