endoreg-db 0.8.4.9__py3-none-any.whl → 0.8.5.0__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 endoreg-db might be problematic. Click here for more details.
- endoreg_db/models/metadata/sensitive_meta_logic.py +3 -0
- endoreg_db/services/video_import.py +19 -3
- {endoreg_db-0.8.4.9.dist-info → endoreg_db-0.8.5.0.dist-info}/METADATA +1 -1
- {endoreg_db-0.8.4.9.dist-info → endoreg_db-0.8.5.0.dist-info}/RECORD +6 -6
- {endoreg_db-0.8.4.9.dist-info → endoreg_db-0.8.5.0.dist-info}/WHEEL +0 -0
- {endoreg_db-0.8.4.9.dist-info → endoreg_db-0.8.5.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -160,6 +160,9 @@ def calculate_patient_hash(instance: "SensitiveMeta", salt: str = SECRET_SALT) -
|
|
|
160
160
|
if not center:
|
|
161
161
|
raise ValueError("Center is required to calculate patient hash.")
|
|
162
162
|
|
|
163
|
+
assert first_name is not None, "First name is required to calculate patient hash."
|
|
164
|
+
assert last_name is not None, "Last name is required to calculate patient hash."
|
|
165
|
+
|
|
163
166
|
hash_str = get_patient_hash(
|
|
164
167
|
first_name=first_name,
|
|
165
168
|
last_name=last_name,
|
|
@@ -901,15 +901,31 @@ class VideoImportService:
|
|
|
901
901
|
|
|
902
902
|
# Ensure center is set from video.center if not in extracted_metadata
|
|
903
903
|
metadata_to_update = extracted_metadata.copy()
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
904
|
+
|
|
905
|
+
# FIX: Set center object instead of center_name string
|
|
906
|
+
if not hasattr(sm, 'center') or not sm.center:
|
|
907
|
+
if video.center:
|
|
908
|
+
metadata_to_update['center'] = video.center
|
|
909
|
+
self.logger.debug("Added center object '%s' to metadata for SensitiveMeta update", video.center.name)
|
|
910
|
+
else:
|
|
911
|
+
center_name = metadata_to_update.get('center_name')
|
|
912
|
+
if center_name:
|
|
913
|
+
try:
|
|
914
|
+
from ..models.administration import Center
|
|
915
|
+
center_obj = Center.objects.get(name=center_name)
|
|
916
|
+
metadata_to_update['center'] = center_obj
|
|
917
|
+
self.logger.debug("Loaded center object '%s' from center_name", center_name)
|
|
918
|
+
metadata_to_update.pop('center_name', None)
|
|
919
|
+
except Center.DoesNotExist:
|
|
920
|
+
self.logger.error("Center '%s' not found in database", center_name)
|
|
921
|
+
return
|
|
907
922
|
|
|
908
923
|
try:
|
|
909
924
|
sm.update_from_dict(metadata_to_update)
|
|
910
925
|
updated_fields = list(extracted_metadata.keys()) # Only log originally extracted fields
|
|
911
926
|
except KeyError as e:
|
|
912
927
|
self.logger.warning(f"Failed to update SensitiveMeta field {e}")
|
|
928
|
+
return
|
|
913
929
|
|
|
914
930
|
if updated_fields:
|
|
915
931
|
try:
|
|
@@ -468,7 +468,7 @@ endoreg_db/models/metadata/model_meta.py,sha256=F_r-PTLeNi4J-4EaGCQkGIguhdl7Bwba
|
|
|
468
468
|
endoreg_db/models/metadata/model_meta_logic.py,sha256=vAbNDaoZygH8xOCulWlXoHoR1T0BSvr9kIloxjzhfjo,12533
|
|
469
469
|
endoreg_db/models/metadata/pdf_meta.py,sha256=BTmpSgqxmPKi0apcNjyrZAS4AFKCPXVdBd6VBeyyv6E,3174
|
|
470
470
|
endoreg_db/models/metadata/sensitive_meta.py,sha256=ekLHrW-b5uYcjfkRd0EW5ncx5ef8Bu-K6msDkpWCAbk,13034
|
|
471
|
-
endoreg_db/models/metadata/sensitive_meta_logic.py,sha256=
|
|
471
|
+
endoreg_db/models/metadata/sensitive_meta_logic.py,sha256=BnxWSSGHRlWLvqGgChzZ13qCXMB7onLE6MOBdE5CBhg,32311
|
|
472
472
|
endoreg_db/models/metadata/video_meta.py,sha256=c6xWdLW3uNqJ5VPJXHCxXA3mbXw-b0uR54-TOS3qL2Q,14966
|
|
473
473
|
endoreg_db/models/metadata/video_prediction_logic.py,sha256=j5N82mHtiomeeIaf1HA65kT5d0htQfJmbI2bJb8mpxQ,7677
|
|
474
474
|
endoreg_db/models/metadata/video_prediction_meta.py,sha256=EyfctAAAVcW9L0gf76ZBc9-G8MLMcD-tc2kkjaaLH4w,10592
|
|
@@ -603,7 +603,7 @@ endoreg_db/services/pseudonym_service.py,sha256=CJhbtRa6K6SPbphgCZgEMi8AFQtB18CU
|
|
|
603
603
|
endoreg_db/services/requirements_object.py,sha256=290zf8AEbVtCoHhW4Jr7_ud-RvrqYmb1Nz9UBHtTnc0,6164
|
|
604
604
|
endoreg_db/services/segment_sync.py,sha256=YgHvIHkbW4mqCu0ACf3zjRSZnNfxWwt4gh5syUVXuE0,6400
|
|
605
605
|
endoreg_db/services/storage_aware_video_processor.py,sha256=kKFK64vXLeBSVkp1YJonU3gFDTeXZ8C4qb9QZZB99SE,13420
|
|
606
|
-
endoreg_db/services/video_import.py,sha256=
|
|
606
|
+
endoreg_db/services/video_import.py,sha256=bnmdtE2-XMXoNOHRfL_NBO03RIIznzHi0DzVxGkLc5I,48006
|
|
607
607
|
endoreg_db/tasks/upload_tasks.py,sha256=OJq7DhNwcbWdXzHY8jz5c51BCVkPN5gSWOz-6Fx6W5M,7799
|
|
608
608
|
endoreg_db/tasks/video_ingest.py,sha256=kxFuYkHijINV0VabQKCFVpJRv6eCAw07tviONurDgg8,5265
|
|
609
609
|
endoreg_db/tasks/video_processing_tasks.py,sha256=rZ7Kr49bAR4Q-vALO2SURebrhcJ5hSFGwjF4aULrOao,14089
|
|
@@ -788,7 +788,7 @@ endoreg_db/views/video/video_meta.py,sha256=C1wBMTtQb_yzEUrhFGAy2UHEWMk_CbU75WXX
|
|
|
788
788
|
endoreg_db/views/video/video_processing_history.py,sha256=mhFuS8RG5GV8E-lTtuD0qrq-bIpnUFp8vy9aERfC-J8,770
|
|
789
789
|
endoreg_db/views/video/video_remove_frames.py,sha256=2FmvNrSPM0fUXiBxINN6vBUUDCqDlBkNcGR3WsLDgKo,1696
|
|
790
790
|
endoreg_db/views/video/video_stream.py,sha256=kLyuf0ORTmsLeYUQkTQ6iRYqlIQozWhMMR3Lhfe_trk,12148
|
|
791
|
-
endoreg_db-0.8.
|
|
792
|
-
endoreg_db-0.8.
|
|
793
|
-
endoreg_db-0.8.
|
|
794
|
-
endoreg_db-0.8.
|
|
791
|
+
endoreg_db-0.8.5.0.dist-info/METADATA,sha256=sbgw_9rLtOsgqYAvPKG0MwFZOyVJ01QGnh5sMBIEPVk,14719
|
|
792
|
+
endoreg_db-0.8.5.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
793
|
+
endoreg_db-0.8.5.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
794
|
+
endoreg_db-0.8.5.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|