Mercurial > libervia-backend
comparison sat/memory/sqla.py @ 3720:40a6374fcd44
memory (sqla): fix `complete` setting when `index` is `None` in `getItems`
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 25 Jan 2022 17:09:54 +0100 |
parents | cf930bb282ac |
children | 658ddbabaf36 |
comparison
equal
deleted
inserted
replaced
3719:cf930bb282ac | 3720:40a6374fcd44 |
---|---|
1371 "count": rows_count, | 1371 "count": rows_count, |
1372 "first": first, | 1372 "first": first, |
1373 "last": last, | 1373 "last": last, |
1374 }.items() if v is not None | 1374 }.items() if v is not None |
1375 } | 1375 } |
1376 metadata["complete"] = index + len(result) == rows_count | 1376 metadata["complete"] = (index or 0) + len(result) == rows_count |
1377 | 1377 |
1378 return items, metadata | 1378 return items, metadata |
1379 | 1379 |
1380 async with self.session() as session: | 1380 async with self.session() as session: |
1381 result = await session.execute(stmt) | 1381 result = await session.execute(stmt) |