Mercurial > libervia-backend
diff 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 |
line wrap: on
line diff
--- a/sat/memory/sqla.py Tue Jan 25 17:07:15 2022 +0100 +++ b/sat/memory/sqla.py Tue Jan 25 17:09:11 2022 +0100 @@ -1365,12 +1365,13 @@ else: last = result[-1][1].name - metadata["rsm"] = { - "index": index, - "count": rows_count, - "first": first, - "last": last, + k: v for k, v in { + "index": index, + "count": rows_count, + "first": first, + "last": last, + }.items() if v is not None } metadata["complete"] = index + len(result) == rows_count