Update util.py column select query

This commit is contained in:
Hannes Plattner 2025-11-19 14:22:59 +01:00 committed by GitHub
parent dc26d15ece
commit d3fb58d62c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -170,7 +170,7 @@ def getItem(uid, intIds=None, storage=None):
def getMigratedItem(uid, storage):
t = storage.getUidTable()
stmt = t.select(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)