aiteamutils 0.2.153__tar.gz → 0.2.155__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiteamutils
3
- Version: 0.2.153
3
+ Version: 0.2.155
4
4
  Summary: AI Team Utilities
5
5
  Project-URL: Homepage, https://github.com/yourusername/aiteamutils
6
6
  Project-URL: Issues, https://github.com/yourusername/aiteamutils/issues
@@ -69,7 +69,15 @@ class BaseService(Generic[ModelType]):
69
69
  if operation != "delete" and 'extra_data' in entity_data_copy and isinstance(entity_data_copy['extra_data'], dict):
70
70
  logger.info(f"[extra_data 확인] {entity_data_copy['extra_data']}")
71
71
  extra_data = entity_data_copy['extra_data'].copy()
72
- file_fields = {k: v for k, v in extra_data.items() if k.endswith('_files') and v} # 빈 리스트는 제외
72
+ # 파일 필드 체크 로직 수정
73
+ file_fields = {}
74
+ for k, v in extra_data.items():
75
+ if v and isinstance(v, (list, tuple)):
76
+ if k.endswith('_files'):
77
+ file_fields[k] = v
78
+ elif any(isinstance(item, (tuple, list)) and len(item) == 2 and hasattr(item[0], 'read') for item in v):
79
+ file_fields[k] = v
80
+
73
81
  logger.info(f"[파일 필드 확인] {file_fields}")
74
82
  logger.info(f"[파일 필드 타입] {[(k, type(v), type(v[0]) if isinstance(v, list) and v else None) for k, v in file_fields.items()]}")
75
83
 
@@ -83,10 +91,9 @@ class BaseService(Generic[ModelType]):
83
91
 
84
92
  # 파일 필드 분리 및 제거
85
93
  for field_name, files in file_fields.items():
86
- if files: # 이미 위에서 필터링했으므로 조건은 제거 가능
87
- logger.info(f"[파일 처리] 필드: {field_name}, 파일 수: {len(files)}")
88
- separated_files[field_name] = files
89
- del extra_data[field_name]
94
+ logger.info(f"[파일 처리] 필드: {field_name}, 파일 수: {len(files)}")
95
+ separated_files[field_name] = files
96
+ del extra_data[field_name]
90
97
 
91
98
  entity_data_copy['extra_data'] = extra_data
92
99
 
@@ -0,0 +1,2 @@
1
+ """버전 정보"""
2
+ __version__ = "0.2.155"
@@ -1,2 +0,0 @@
1
- """버전 정보"""
2
- __version__ = "0.2.153"
File without changes
File without changes
File without changes