aiteamutils 0.2.90__py3-none-any.whl → 0.2.91__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_service.py
CHANGED
@@ -46,9 +46,11 @@ class BaseService(Generic[ModelType]):
|
|
46
46
|
org_ulid_position: str = "organization_ulid",
|
47
47
|
role_permission: str = "create"
|
48
48
|
) -> ModelType:
|
49
|
-
await verify_role_permission(request, role_permission)
|
49
|
+
payload = await verify_role_permission(request, role_permission)
|
50
50
|
|
51
51
|
try:
|
52
|
+
body = await request.json()
|
53
|
+
|
52
54
|
async with self.db_session.begin():
|
53
55
|
# 고유 검사 수행
|
54
56
|
if unique_check:
|
@@ -58,7 +60,15 @@ class BaseService(Generic[ModelType]):
|
|
58
60
|
await validate_unique_fields(self.db_session, fk_check, find_value=False)
|
59
61
|
|
60
62
|
if org_ulid_position:
|
61
|
-
|
63
|
+
organization_ulid = body.get(org_ulid_position)
|
64
|
+
|
65
|
+
if not organization_ulid == payload.get("organization_ulid"):
|
66
|
+
raise CustomException(
|
67
|
+
ErrorCode.INVALID_INPUT,
|
68
|
+
detail="organization_ulid is required",
|
69
|
+
source_function=f"{self.__class__.__name__}.create"
|
70
|
+
)
|
71
|
+
|
62
72
|
result = await self.repository.create(
|
63
73
|
entity_data=entity_data,
|
64
74
|
exclude_entities=exclude_entities
|
@@ -189,12 +199,14 @@ class BaseService(Generic[ModelType]):
|
|
189
199
|
limit: int = 100,
|
190
200
|
filters: List[Dict[str, Any]] | None = None,
|
191
201
|
org_ulid_position: str = "organization_ulid",
|
202
|
+
role_permission: str = "list",
|
192
203
|
response_model: Any = None,
|
193
204
|
explicit_joins: Optional[List[Any]] = None,
|
194
205
|
loading_joins: Optional[List[Any]] = None,
|
195
206
|
order: Optional[str] = None,
|
196
|
-
role_permission: str = "list"
|
197
207
|
) -> List[Dict[str, Any]]:
|
208
|
+
payload = await verify_role_permission(request, role_permission)
|
209
|
+
|
198
210
|
try:
|
199
211
|
if order is None:
|
200
212
|
order = "created_at|desc"
|
aiteamutils/version.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
"""버전 정보"""
|
2
|
-
__version__ = "0.2.
|
2
|
+
__version__ = "0.2.91"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
aiteamutils/__init__.py,sha256=kRBpRjark0M8ZwFfmKiMFol6CbIILN3WE4f6_P6iIq0,1089
|
2
2
|
aiteamutils/base_model.py,sha256=bnRJJaGXGS3TKxfCWWV3arFjdG0qLsPFDXuguYsDyVM,3008
|
3
3
|
aiteamutils/base_repository.py,sha256=HKcgYyEb0JypojoXBFcIT39hPC5CqnjBkHT__GV-lfQ,4615
|
4
|
-
aiteamutils/base_service.py,sha256=
|
4
|
+
aiteamutils/base_service.py,sha256=QPehqL8yuShoRr6T7EwlgRln04iOWCd8rWnm4CVJK0w,10018
|
5
5
|
aiteamutils/cache.py,sha256=07xBGlgAwOTAdY5mnMOQJ5EBxVwe8glVD7DkGEkxCtw,1373
|
6
6
|
aiteamutils/config.py,sha256=YdalpJb70-txhGJAS4aaKglEZAFVWgfzw5BXSWpkUz4,3232
|
7
7
|
aiteamutils/database.py,sha256=b4fN0XHNWxMJeS5M95JcJ7tujAJ1x3SPTAfDvJdB4sE,19696
|
@@ -9,7 +9,7 @@ aiteamutils/enums.py,sha256=Z9wzR3H4XLpA4U3urR5e4eDnEY3Qhne34nLXsKXiL64,2177
|
|
9
9
|
aiteamutils/exceptions.py,sha256=wls-R8qbD7fWzEgDDY1Eiy1vXl59R5IsCXTRkZpBiGU,16021
|
10
10
|
aiteamutils/security.py,sha256=HFMaGnvLp_JR2D9AEKpGRMQF2aAjiPdIOF0ysMS1dWk,10853
|
11
11
|
aiteamutils/validators.py,sha256=PvI9hbMEAqTawgxPbiWRyx2r9yTUrpNBQs1AD3w4F2U,7726
|
12
|
-
aiteamutils/version.py,sha256=
|
13
|
-
aiteamutils-0.2.
|
14
|
-
aiteamutils-0.2.
|
15
|
-
aiteamutils-0.2.
|
12
|
+
aiteamutils/version.py,sha256=PJ1UnX24vSCQ_oIDO0VfRRLdxDepWeHiu724PJ96z5g,42
|
13
|
+
aiteamutils-0.2.91.dist-info/METADATA,sha256=neRTid2ZSl9g5jUO8KUJ2qbvDTMhfcz6FyYc-P48o30,1718
|
14
|
+
aiteamutils-0.2.91.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
15
|
+
aiteamutils-0.2.91.dist-info/RECORD,,
|
File without changes
|