nucliadb 6.7.1.post4846__py3-none-any.whl → 6.7.1.post4850__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of nucliadb might be problematic. Click here for more details.

@@ -99,7 +99,7 @@ class Conversation(Field[PBConversation]):
99
99
  metadata.total += len(messages)
100
100
 
101
101
  # Store the messages in pages of PAGE_SIZE messages
102
- while len(messages) > 0:
102
+ while True:
103
103
  # Fit the messages in the last page
104
104
  available_space = metadata.size - len(last_page.messages)
105
105
  last_page.messages.extend(messages[:available_space])
@@ -112,6 +112,8 @@ class Conversation(Field[PBConversation]):
112
112
  if len(messages) > 0:
113
113
  metadata.pages += 1
114
114
  last_page = PBConversation()
115
+ else:
116
+ break
115
117
 
116
118
  # Finally, set the metadata
117
119
  await self.db_set_metadata(metadata)
@@ -176,11 +178,10 @@ class Conversation(Field[PBConversation]):
176
178
  page=page,
177
179
  )
178
180
  payload = await self.resource.txn.get(field_key)
179
- if payload:
180
- self.value[page] = PBConversation()
181
- self.value[page].ParseFromString(payload)
182
- else:
181
+ if payload is None:
183
182
  raise PageNotFound()
183
+ self.value[page] = PBConversation()
184
+ self.value[page].ParseFromString(payload)
184
185
  return self.value[page]
185
186
 
186
187
  async def db_set_value(self, payload: PBConversation, page: int = 0):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nucliadb
3
- Version: 6.7.1.post4846
3
+ Version: 6.7.1.post4850
4
4
  Summary: NucliaDB
5
5
  Author-email: Nuclia <nucliadb@nuclia.com>
6
6
  License-Expression: AGPL-3.0-or-later
@@ -19,11 +19,11 @@ Classifier: Programming Language :: Python :: 3.12
19
19
  Classifier: Programming Language :: Python :: 3 :: Only
20
20
  Requires-Python: <4,>=3.9
21
21
  Description-Content-Type: text/markdown
22
- Requires-Dist: nucliadb-telemetry[all]>=6.7.1.post4846
23
- Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.7.1.post4846
24
- Requires-Dist: nucliadb-protos>=6.7.1.post4846
25
- Requires-Dist: nucliadb-models>=6.7.1.post4846
26
- Requires-Dist: nidx-protos>=6.7.1.post4846
22
+ Requires-Dist: nucliadb-telemetry[all]>=6.7.1.post4850
23
+ Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.7.1.post4850
24
+ Requires-Dist: nucliadb-protos>=6.7.1.post4850
25
+ Requires-Dist: nucliadb-models>=6.7.1.post4850
26
+ Requires-Dist: nidx-protos>=6.7.1.post4850
27
27
  Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
28
28
  Requires-Dist: nuclia-models>=0.46.0
29
29
  Requires-Dist: uvicorn[standard]
@@ -149,7 +149,7 @@ nucliadb/ingest/consumer/shard_creator.py,sha256=w0smEu01FU_2cjZnsfBRNqT_Ntho11X
149
149
  nucliadb/ingest/consumer/utils.py,sha256=jpX8D4lKzuPCpArQLZeX_Zczq3pfen_zAf8sPJfOEZU,2642
150
150
  nucliadb/ingest/fields/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
151
151
  nucliadb/ingest/fields/base.py,sha256=O9rMKZmSdZmcxtuO6qUXjeoAkmUR5A-xga49Jyn6caI,24192
152
- nucliadb/ingest/fields/conversation.py,sha256=W68Y7riDXbwavpE4jKslLNAjdqCVaaR2a-BisZYayeo,7675
152
+ nucliadb/ingest/fields/conversation.py,sha256=3_MZY_w0zK-9rd6Pb_sPVBUP2YB5twOZSdo_9lCa8KQ,7684
153
153
  nucliadb/ingest/fields/exceptions.py,sha256=sZBk21BSrXFdOdo1qUdCAyD-9YMYakSLdn4_WdIPCIQ,1217
154
154
  nucliadb/ingest/fields/file.py,sha256=1v4jLg3balUua2VmSV8hHkAwPFShTUCOzufZvIUQcQw,4740
155
155
  nucliadb/ingest/fields/generic.py,sha256=elgtqv15aJUq3zY7X_g0bli_2BpcwPArVvzhe54Y4Ig,1547
@@ -376,8 +376,8 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
376
376
  nucliadb/writer/tus/s3.py,sha256=vu1BGg4VqJ_x2P1u2BxqPKlSfw5orT_a3R-Ln5oPUpU,8483
377
377
  nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
378
378
  nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
379
- nucliadb-6.7.1.post4846.dist-info/METADATA,sha256=nZ2Zl2SvEbsdDVth8ZHY1EIuuoBLeXaMJKO4TAR3N1k,4158
380
- nucliadb-6.7.1.post4846.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
381
- nucliadb-6.7.1.post4846.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
382
- nucliadb-6.7.1.post4846.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
383
- nucliadb-6.7.1.post4846.dist-info/RECORD,,
379
+ nucliadb-6.7.1.post4850.dist-info/METADATA,sha256=pNGEQWZfL5v3otLC_YY2zSlFPubcRIhF2fO7Y5GxVbM,4158
380
+ nucliadb-6.7.1.post4850.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
381
+ nucliadb-6.7.1.post4850.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
382
+ nucliadb-6.7.1.post4850.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
383
+ nucliadb-6.7.1.post4850.dist-info/RECORD,,