diff 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
line wrap: on
line diff
--- a/sat/memory/sqla.py	Tue Jan 25 17:09:11 2022 +0100
+++ b/sat/memory/sqla.py	Tue Jan 25 17:09:54 2022 +0100
@@ -1373,7 +1373,7 @@
                     "last": last,
                 }.items() if v is not None
             }
-            metadata["complete"] = index + len(result) == rows_count
+            metadata["complete"] = (index or 0) + len(result) == rows_count
 
             return items, metadata