Mercurial > libervia-backend
comparison sat/memory/sqla.py @ 3719:cf930bb282ac
memory (sqla): don't set keys with None as value for RSM in `getItems`
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 25 Jan 2022 17:09:11 +0100 |
parents | bd13391ee29e |
children | 40a6374fcd44 |
comparison
equal
deleted
inserted
replaced
3718:16e36f0dd1cb | 3719:cf930bb282ac |
---|---|
1363 first = None | 1363 first = None |
1364 last = None | 1364 last = None |
1365 else: | 1365 else: |
1366 last = result[-1][1].name | 1366 last = result[-1][1].name |
1367 | 1367 |
1368 | |
1369 metadata["rsm"] = { | 1368 metadata["rsm"] = { |
1370 "index": index, | 1369 k: v for k, v in { |
1371 "count": rows_count, | 1370 "index": index, |
1372 "first": first, | 1371 "count": rows_count, |
1373 "last": last, | 1372 "first": first, |
1373 "last": last, | |
1374 }.items() if v is not None | |
1374 } | 1375 } |
1375 metadata["complete"] = index + len(result) == rows_count | 1376 metadata["complete"] = index + len(result) == rows_count |
1376 | 1377 |
1377 return items, metadata | 1378 return items, metadata |
1378 | 1379 |