aiteamutils 0.2.136__py3-none-any.whl → 0.2.137__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.
- aiteamutils/base_repository.py +2 -2
- aiteamutils/base_service.py +13 -13
- aiteamutils/database.py +2 -2
- aiteamutils/version.py +1 -1
- {aiteamutils-0.2.136.dist-info → aiteamutils-0.2.137.dist-info}/METADATA +1 -1
- {aiteamutils-0.2.136.dist-info → aiteamutils-0.2.137.dist-info}/RECORD +7 -7
- {aiteamutils-0.2.136.dist-info → aiteamutils-0.2.137.dist-info}/WHEEL +0 -0
aiteamutils/base_repository.py
CHANGED
@@ -32,7 +32,7 @@ class BaseRepository(Generic[ModelType]):
|
|
32
32
|
raise CustomException(
|
33
33
|
ErrorCode.DB_CONNECTION_ERROR,
|
34
34
|
detail="Session cannot be None",
|
35
|
-
source_function=f"{self.__class__.__name__}.session"
|
35
|
+
source_function=f"base_repository.{self.__class__.__name__}.session"
|
36
36
|
)
|
37
37
|
self._session = value
|
38
38
|
|
@@ -57,7 +57,7 @@ class BaseRepository(Generic[ModelType]):
|
|
57
57
|
raise CustomException(
|
58
58
|
ErrorCode.INTERNAL_ERROR,
|
59
59
|
detail=str(e),
|
60
|
-
source_function=f"{self.__class__.__name__}.create",
|
60
|
+
source_function=f"base_repository.{self.__class__.__name__}.create",
|
61
61
|
original_error=e
|
62
62
|
)
|
63
63
|
|
aiteamutils/base_service.py
CHANGED
@@ -61,7 +61,7 @@ class BaseService(Generic[ModelType]):
|
|
61
61
|
raise CustomException(
|
62
62
|
ErrorCode.FORBIDDEN,
|
63
63
|
detail=f"{role_permission}",
|
64
|
-
source_function=f"{self.__class__.__name__}.create"
|
64
|
+
source_function=f"base_service.{self.__class__.__name__}.create.permission_result"
|
65
65
|
)
|
66
66
|
|
67
67
|
try:
|
@@ -81,7 +81,7 @@ class BaseService(Generic[ModelType]):
|
|
81
81
|
raise CustomException(
|
82
82
|
ErrorCode.INVALID_INPUT,
|
83
83
|
detail="storage_dir is required for file upload",
|
84
|
-
source_function=f"{self.__class__.__name__}.create"
|
84
|
+
source_function=f"base_service.{self.__class__.__name__}.create.file_keys"
|
85
85
|
)
|
86
86
|
|
87
87
|
# 먼저 엔티티를 생성하여 ULID를 얻음
|
@@ -126,7 +126,7 @@ class BaseService(Generic[ModelType]):
|
|
126
126
|
raise CustomException(
|
127
127
|
ErrorCode.INTERNAL_ERROR,
|
128
128
|
detail=str(e),
|
129
|
-
source_function=f"{self.__class__.__name__}.create",
|
129
|
+
source_function=f"base_service.{self.__class__.__name__}.create",
|
130
130
|
original_error=e
|
131
131
|
)
|
132
132
|
|
@@ -153,7 +153,7 @@ class BaseService(Generic[ModelType]):
|
|
153
153
|
raise CustomException(
|
154
154
|
ErrorCode.INVALID_INPUT,
|
155
155
|
detail="Either 'ulid' or 'conditions' must be provided.",
|
156
|
-
source_function="
|
156
|
+
source_function=f"base_service.{self.__class__.__name__}.update.ulid_or_conditions"
|
157
157
|
)
|
158
158
|
|
159
159
|
# ulid로 조건 생성
|
@@ -162,7 +162,7 @@ class BaseService(Generic[ModelType]):
|
|
162
162
|
raise CustomException(
|
163
163
|
ErrorCode.VALIDATION_ERROR,
|
164
164
|
detail=ulid,
|
165
|
-
source_function=f"{self.__class__.__name__}.update"
|
165
|
+
source_function=f"base_service.{self.__class__.__name__}.update.ulid_or_conditions"
|
166
166
|
)
|
167
167
|
|
168
168
|
conditions = {"ulid": ulid}
|
@@ -183,7 +183,7 @@ class BaseService(Generic[ModelType]):
|
|
183
183
|
raise CustomException(
|
184
184
|
ErrorCode.INTERNAL_ERROR,
|
185
185
|
detail=str(e),
|
186
|
-
source_function=f"{self.__class__.__name__}.update",
|
186
|
+
source_function=f"base_service.{self.__class__.__name__}.update",
|
187
187
|
original_error=e
|
188
188
|
)
|
189
189
|
|
@@ -201,14 +201,14 @@ class BaseService(Generic[ModelType]):
|
|
201
201
|
raise CustomException(
|
202
202
|
ErrorCode.VALIDATION_ERROR,
|
203
203
|
detail=ulid,
|
204
|
-
source_function=f"{self.__class__.__name__}.delete"
|
204
|
+
source_function=f"base_service.{self.__class__.__name__}.delete.ulid_validation"
|
205
205
|
)
|
206
206
|
|
207
207
|
if not ulid and not conditions:
|
208
208
|
raise CustomException(
|
209
209
|
ErrorCode.INVALID_INPUT,
|
210
210
|
detail="Either 'ulid' or 'conditions' must be provided.",
|
211
|
-
source_function="
|
211
|
+
source_function=f"base_service.{self.__class__.__name__}.delete.ulid_or_conditions"
|
212
212
|
)
|
213
213
|
|
214
214
|
# ulid로 조건 생성
|
@@ -226,7 +226,7 @@ class BaseService(Generic[ModelType]):
|
|
226
226
|
raise CustomException(
|
227
227
|
ErrorCode.INTERNAL_ERROR,
|
228
228
|
detail=str(e),
|
229
|
-
source_function=f"{self.__class__.__name__}.delete",
|
229
|
+
source_function=f"base_service.{self.__class__.__name__}.delete",
|
230
230
|
original_error=e
|
231
231
|
)
|
232
232
|
|
@@ -282,7 +282,7 @@ class BaseService(Generic[ModelType]):
|
|
282
282
|
except Exception as e:
|
283
283
|
raise CustomException(
|
284
284
|
ErrorCode.INTERNAL_ERROR,
|
285
|
-
source_function=f"{self.__class__.__name__}.list",
|
285
|
+
source_function=f"base_service.{self.__class__.__name__}.list",
|
286
286
|
original_error=e
|
287
287
|
)
|
288
288
|
|
@@ -304,7 +304,7 @@ class BaseService(Generic[ModelType]):
|
|
304
304
|
raise CustomException(
|
305
305
|
ErrorCode.INVALID_INPUT,
|
306
306
|
detail="Either 'ulid' or 'conditions' must be provided.",
|
307
|
-
source_function="
|
307
|
+
source_function=f"base_service.{self.__class__.__name__}.get.ulid_or_conditions"
|
308
308
|
)
|
309
309
|
|
310
310
|
# ulid로 조건 생성
|
@@ -313,7 +313,7 @@ class BaseService(Generic[ModelType]):
|
|
313
313
|
raise CustomException(
|
314
314
|
ErrorCode.VALIDATION_ERROR,
|
315
315
|
detail=ulid,
|
316
|
-
source_function=f"{self.__class__.__name__}.
|
316
|
+
source_function=f"base_service.{self.__class__.__name__}.get.ulid_validation"
|
317
317
|
)
|
318
318
|
|
319
319
|
conditions = {"ulid": ulid}
|
@@ -331,7 +331,7 @@ class BaseService(Generic[ModelType]):
|
|
331
331
|
raise CustomException(
|
332
332
|
ErrorCode.INTERNAL_ERROR,
|
333
333
|
detail=str(e),
|
334
|
-
source_function=f"{self.__class__.__name__}.get",
|
334
|
+
source_function=f"base_service.{self.__class__.__name__}.get",
|
335
335
|
original_error=e
|
336
336
|
)
|
337
337
|
|
aiteamutils/database.py
CHANGED
@@ -341,7 +341,7 @@ async def update_entity(
|
|
341
341
|
raise CustomException(
|
342
342
|
ErrorCode.NOT_FOUND,
|
343
343
|
detail=f"{model.__name__}|{conditions}.",
|
344
|
-
source_function="database.update_entity"
|
344
|
+
source_function="database.update_entity.not_entity"
|
345
345
|
)
|
346
346
|
|
347
347
|
# 기존 데이터를 딕셔너리로 변환
|
@@ -394,7 +394,7 @@ async def delete_entity(
|
|
394
394
|
raise CustomException(
|
395
395
|
ErrorCode.NOT_FOUND,
|
396
396
|
detail=f"{model.__name__}|{conditions}.",
|
397
|
-
source_function="database.delete_entity"
|
397
|
+
source_function="database.delete_entity.not_entity"
|
398
398
|
)
|
399
399
|
|
400
400
|
entity.is_deleted = True
|
aiteamutils/version.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
"""버전 정보"""
|
2
|
-
__version__ = "0.2.
|
2
|
+
__version__ = "0.2.137"
|
@@ -1,16 +1,16 @@
|
|
1
1
|
aiteamutils/__init__.py,sha256=kRBpRjark0M8ZwFfmKiMFol6CbIILN3WE4f6_P6iIq0,1089
|
2
2
|
aiteamutils/base_model.py,sha256=0rs4cjnF2ea3Q2vBTj6F64BGk7ZglJsChsS7ne_R_tg,4056
|
3
|
-
aiteamutils/base_repository.py,sha256=
|
4
|
-
aiteamutils/base_service.py,sha256=
|
3
|
+
aiteamutils/base_repository.py,sha256=Oy2zE1i5qx60Xf1tnsaKLyFWapiPqt5JH8NejwNrPWg,4647
|
4
|
+
aiteamutils/base_service.py,sha256=LrmntqvNx8SxgNrumkkPMv0vaKMMPVJrHzoXmDdx83M,12839
|
5
5
|
aiteamutils/cache.py,sha256=07xBGlgAwOTAdY5mnMOQJ5EBxVwe8glVD7DkGEkxCtw,1373
|
6
6
|
aiteamutils/config.py,sha256=YdalpJb70-txhGJAS4aaKglEZAFVWgfzw5BXSWpkUz4,3232
|
7
|
-
aiteamutils/database.py,sha256=
|
7
|
+
aiteamutils/database.py,sha256=msvBKtxWeQVOo0v2Q9i2azuTNtnUItuNNar52gdRZTo,20418
|
8
8
|
aiteamutils/enums.py,sha256=7WLqlcJqQWtETAga2WAxNp3dJTQIAd2TW-4WzkoHHa8,2498
|
9
9
|
aiteamutils/exceptions.py,sha256=pgf3ersezObyl17wAO3I2fb8m9t2OzWDX1mSjwAWm2Y,16035
|
10
10
|
aiteamutils/files.py,sha256=tdvivl3XLNv7Al7H1gGFczmrHM8XlQpiZsEc2xQ_UTU,8829
|
11
11
|
aiteamutils/security.py,sha256=McUl3t5Z5SyUDVUHymHdDkYyF4YSeg4g9fFMML4W6Kw,11630
|
12
12
|
aiteamutils/validators.py,sha256=msOrha36xWsapm4VAh63YmFq1GVyC9tzZcjXYFCEZ_g,11949
|
13
|
-
aiteamutils/version.py,sha256=
|
14
|
-
aiteamutils-0.2.
|
15
|
-
aiteamutils-0.2.
|
16
|
-
aiteamutils-0.2.
|
13
|
+
aiteamutils/version.py,sha256=paOXlTEx5pKbXz3iDW_A_JPzLhKBZg6PmXu5SqD_82I,43
|
14
|
+
aiteamutils-0.2.137.dist-info/METADATA,sha256=4dfPUZv6C9Xoq8E0HbsY8ToWEx_lsCLpM8qawukEPz0,1719
|
15
|
+
aiteamutils-0.2.137.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
16
|
+
aiteamutils-0.2.137.dist-info/RECORD,,
|
File without changes
|