more fixes for util.getMigratedItem()

This commit is contained in:
Helmut Merz 2025-11-19 15:57:53 +01:00
parent d3fb58d62c
commit 1b93e6148b

View file

@ -170,10 +170,10 @@ def getItem(uid, intIds=None, storage=None):
def getMigratedItem(uid, storage):
t = storage.getUidTable()
stmt = t.select.with_only_columns([t.c.prefix, t.c.id]).where(t.c.legacy == int(uid))
stmt = t.select().with_only_columns(t.c.prefix, t.c.id).where(t.c.legacy == int(uid))
newId = storage.session.execute(stmt).first()
if newId is not None:
return storage.getItem('%s-%i' % newId)
return storage.getItem('%s-%i' % tuple(newId))
return None
def getObjectForUid(uid, intIds=None):