aiteamutils 0.2.90__tar.gz → 0.2.91__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.90
3
+ Version: 0.2.91
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
@@ -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"
@@ -0,0 +1,2 @@
1
+ """버전 정보"""
2
+ __version__ = "0.2.91"
@@ -1,2 +0,0 @@
1
- """버전 정보"""
2
- __version__ = "0.2.90"
File without changes
File without changes
File without changes
File without changes