nucliadb 6.3.4.post3663__py3-none-any.whl → 6.3.4.post3675__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.
@@ -45,7 +45,7 @@ from nucliadb.writer.api.v1.resource import (
45
45
  from nucliadb.writer.api.v1.slug import ensure_slug_uniqueness, noop_context_manager
46
46
  from nucliadb.writer.back_pressure import maybe_back_pressure
47
47
  from nucliadb.writer.resource.audit import parse_audit
48
- from nucliadb.writer.resource.basic import parse_basic_creation
48
+ from nucliadb.writer.resource.basic import parse_basic_creation, parse_user_classifications
49
49
  from nucliadb.writer.resource.field import (
50
50
  atomic_get_stored_resource_classifications,
51
51
  parse_fields,
@@ -887,6 +887,9 @@ async def store_file_on_nuclia_db(
887
887
  parse_audit(writer.audit, request)
888
888
 
889
889
  unique_slug_context_manager = noop_context_manager()
890
+
891
+ resource_classifications = await atomic_get_stored_resource_classifications(kbid, rid)
892
+
890
893
  if item is not None:
891
894
  if item.slug:
892
895
  unique_slug_context_manager = ensure_slug_uniqueness(kbid, item.slug)
@@ -903,8 +906,9 @@ async def store_file_on_nuclia_db(
903
906
  parse_extra(writer.extra, item.extra)
904
907
 
905
908
  toprocess.title = writer.basic.title
906
-
907
- resource_classifications = await atomic_get_stored_resource_classifications(kbid, rid)
909
+ if item.usermetadata:
910
+ # Any resource level classification that comes on the request payload overrides the stored ones
911
+ resource_classifications.resource_level = set(parse_user_classifications(item))
908
912
  await parse_fields(
909
913
  writer=writer,
910
914
  item=item,
@@ -958,8 +962,7 @@ async def store_file_on_nuclia_db(
958
962
  )
959
963
  )
960
964
 
961
- rclassif = await atomic_get_stored_resource_classifications(kbid, rid)
962
- classif_labels = rclassif.for_field(field, resources_pb2.FieldType.FILE)
965
+ classif_labels = resource_classifications.for_field(field, resources_pb2.FieldType.FILE)
963
966
  toprocess.filefield[field] = await processing.convert_internal_filefield_to_str(
964
967
  file_field, storage=storage, classif_labels=classif_labels
965
968
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nucliadb
3
- Version: 6.3.4.post3663
3
+ Version: 6.3.4.post3675
4
4
  Summary: NucliaDB
5
5
  Author-email: Nuclia <nucliadb@nuclia.com>
6
6
  License: AGPL
@@ -20,11 +20,11 @@ Classifier: Programming Language :: Python :: 3.12
20
20
  Classifier: Programming Language :: Python :: 3 :: Only
21
21
  Requires-Python: <4,>=3.9
22
22
  Description-Content-Type: text/markdown
23
- Requires-Dist: nucliadb-telemetry[all]>=6.3.4.post3663
24
- Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.3.4.post3663
25
- Requires-Dist: nucliadb-protos>=6.3.4.post3663
26
- Requires-Dist: nucliadb-models>=6.3.4.post3663
27
- Requires-Dist: nidx-protos>=6.3.4.post3663
23
+ Requires-Dist: nucliadb-telemetry[all]>=6.3.4.post3675
24
+ Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.3.4.post3675
25
+ Requires-Dist: nucliadb-protos>=6.3.4.post3675
26
+ Requires-Dist: nucliadb-models>=6.3.4.post3675
27
+ Requires-Dist: nidx-protos>=6.3.4.post3675
28
28
  Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
29
29
  Requires-Dist: nuclia-models>=0.24.2
30
30
  Requires-Dist: uvicorn
@@ -336,7 +336,7 @@ nucliadb/writer/api/v1/router.py,sha256=RjuoWLpZer6Kl2BW_wznpNo6XL3BOpdTGqXZCn3Q
336
336
  nucliadb/writer/api/v1/services.py,sha256=HLQW18AEC5zQp5azpeAtRi7ZTzQSwG6SbmkHlmjTIFA,13165
337
337
  nucliadb/writer/api/v1/slug.py,sha256=xlVBDBpRi9bNulpBHZwhyftVvulfE0zFm1XZIWl-AKY,2389
338
338
  nucliadb/writer/api/v1/transaction.py,sha256=d2Vbgnkk_-FLGSTt3vfldwiJIUf0XoyD0wP1jQNz_DY,2430
339
- nucliadb/writer/api/v1/upload.py,sha256=iFHD3nB1ZXiSNyoOzIdzJ0PNLBnnlfOWPba1qWieT4o,33608
339
+ nucliadb/writer/api/v1/upload.py,sha256=hLMHXSaqEOE-vjKjhIupgdx8klJc3mVQp_oMwx5N-7o,33800
340
340
  nucliadb/writer/api/v1/vectorsets.py,sha256=mESaXkkI9f-jWWMW61ZZgv7E5YWXKemyc6vwT0lFXns,6747
341
341
  nucliadb/writer/resource/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
342
342
  nucliadb/writer/resource/audit.py,sha256=FvxMZPzrNHtd31HgpZEvxzwAkbxJTZRhPLqRYYJi3tA,1426
@@ -352,8 +352,8 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
352
352
  nucliadb/writer/tus/s3.py,sha256=vF0NkFTXiXhXq3bCVXXVV-ED38ECVoUeeYViP8uMqcU,8357
353
353
  nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
354
354
  nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
355
- nucliadb-6.3.4.post3663.dist-info/METADATA,sha256=Olqrr9vrS1hKJrDcrbrYwfm62xUA3i4aj8WVRLxeePc,4291
356
- nucliadb-6.3.4.post3663.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
357
- nucliadb-6.3.4.post3663.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
358
- nucliadb-6.3.4.post3663.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
359
- nucliadb-6.3.4.post3663.dist-info/RECORD,,
355
+ nucliadb-6.3.4.post3675.dist-info/METADATA,sha256=WfRjwWmeEZALPK3kwAm8Yh2VuYhd3KvyxNzEcrs5IWs,4291
356
+ nucliadb-6.3.4.post3675.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
357
+ nucliadb-6.3.4.post3675.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
358
+ nucliadb-6.3.4.post3675.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
359
+ nucliadb-6.3.4.post3675.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.0.0)
2
+ Generator: setuptools (76.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5