arpakitlib 1.8.166__py3-none-any.whl → 1.8.168__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.
- arpakitlib/_arpakit_project_template_v_5/arpakitlib_project_template_info.json +1 -1
- arpakitlib/_arpakit_project_template_v_5/project/api/exception.py +3 -1
- arpakitlib/_arpakit_project_template_v_5/project/api/exception_handler.py +4 -0
- arpakitlib/_arpakit_project_template_v_5/project/sqladmin_/model_view/user.py +2 -0
- {arpakitlib-1.8.166.dist-info → arpakitlib-1.8.168.dist-info}/METADATA +1 -1
- {arpakitlib-1.8.166.dist-info → arpakitlib-1.8.168.dist-info}/RECORD +9 -9
- {arpakitlib-1.8.166.dist-info → arpakitlib-1.8.168.dist-info}/LICENSE +0 -0
- {arpakitlib-1.8.166.dist-info → arpakitlib-1.8.168.dist-info}/WHEEL +0 -0
- {arpakitlib-1.8.166.dist-info → arpakitlib-1.8.168.dist-info}/entry_points.txt +0 -0
@@ -14,7 +14,8 @@ class APIException(fastapi.exceptions.HTTPException):
|
|
14
14
|
error_code: str | None = APIErrorCodes.unknown_error,
|
15
15
|
error_specification_code: str | None = None,
|
16
16
|
error_description: str | None = None,
|
17
|
-
error_data: dict[str, Any] | None = None
|
17
|
+
error_data: dict[str, Any] | None = None,
|
18
|
+
create_story_log: bool = True
|
18
19
|
):
|
19
20
|
self.status_code = status_code
|
20
21
|
self.error_code = error_code
|
@@ -23,6 +24,7 @@ class APIException(fastapi.exceptions.HTTPException):
|
|
23
24
|
if error_data is None:
|
24
25
|
error_data = {}
|
25
26
|
self.error_data = error_data
|
27
|
+
self.create_story_log = create_story_log
|
26
28
|
|
27
29
|
self.error_common_so = ErrorCommonSO(
|
28
30
|
has_error=True,
|
@@ -209,6 +209,10 @@ def create_story_log_func_before_in_api_exception_handler(
|
|
209
209
|
):
|
210
210
|
return
|
211
211
|
|
212
|
+
if isinstance(exception, APIException):
|
213
|
+
if not exception.create_story_log:
|
214
|
+
return
|
215
|
+
|
212
216
|
async with get_cached_sqlalchemy_db().new_async_session() as session:
|
213
217
|
story_log_dbm = StoryLogDBM(
|
214
218
|
level=StoryLogDBM.Levels.error,
|
@@ -78,9 +78,11 @@ class UserMV(SimpleMV, model=UserDBM):
|
|
78
78
|
]
|
79
79
|
column_formatters = {
|
80
80
|
UserDBM.creation_dt: lambda m, _: format_datetime_(m.creation_dt),
|
81
|
+
UserDBM.tg_data: lambda m, a: format_json_for_preview_(m.tg_data),
|
81
82
|
UserDBM.extra_data: lambda m, a: format_json_for_preview_(m.extra_data),
|
82
83
|
}
|
83
84
|
column_formatters_detail = {
|
84
85
|
UserDBM.creation_dt: lambda m, _: format_datetime_(m.creation_dt),
|
86
|
+
UserDBM.tg_data: lambda m, a: format_json_for_preview_(m.tg_data),
|
85
87
|
UserDBM.extra_data: lambda m, a: format_json_(m.extra_data),
|
86
88
|
}
|
@@ -8,7 +8,7 @@ arpakitlib/_arpakit_project_template_v_5/alembic/env.py,sha256=Qesmnj5A2kB-Doeuf
|
|
8
8
|
arpakitlib/_arpakit_project_template_v_5/alembic/script.py.mako,sha256=MEqL-2qATlST9TAOeYgscMn1uy6HUS9NFvDgl93dMj8,635
|
9
9
|
arpakitlib/_arpakit_project_template_v_5/alembic/versions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
10
|
arpakitlib/_arpakit_project_template_v_5/alembic.ini,sha256=8fuyeEvGBiPGbxEFy8ISBV3xX_fgVmuhEGpB10_B5Uo,3733
|
11
|
-
arpakitlib/_arpakit_project_template_v_5/arpakitlib_project_template_info.json,sha256=
|
11
|
+
arpakitlib/_arpakit_project_template_v_5/arpakitlib_project_template_info.json,sha256=mbM5q-3lHD1IaIdSI-fTT_4o4n1UotqzksLxGBNxxjg,98
|
12
12
|
arpakitlib/_arpakit_project_template_v_5/command/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
13
|
arpakitlib/_arpakit_project_template_v_5/command/alembic_history.sh,sha256=OMnDNtHIksGh9iavWnzbtxcudZW4vjdcISsBXvzZSPw,22
|
14
14
|
arpakitlib/_arpakit_project_template_v_5/command/alembic_revision_autogenerate.sh,sha256=yW2i-SBOtBx15Ya0poVQqKkJM5t2JZp06r9AEW-DmGE,46
|
@@ -92,8 +92,8 @@ arpakitlib/_arpakit_project_template_v_5/project/api/const.py,sha256=J9bqaRRiIc3
|
|
92
92
|
arpakitlib/_arpakit_project_template_v_5/project/api/create_api_app.py,sha256=R9NJXGss1oO-T1ztInFetQ8SoqIXsV5UyKelU7R2-og,2913
|
93
93
|
arpakitlib/_arpakit_project_template_v_5/project/api/create_first_data.py,sha256=sc98-xW74QbhFCT6AW5-fUJVd8RLRxClAOEW5-ec9T0,1815
|
94
94
|
arpakitlib/_arpakit_project_template_v_5/project/api/event.py,sha256=P8gV2Bq6LeLH0JDN9Z3O401PMbyNr2n-tme2gPvT-m4,996
|
95
|
-
arpakitlib/_arpakit_project_template_v_5/project/api/exception.py,sha256=
|
96
|
-
arpakitlib/_arpakit_project_template_v_5/project/api/exception_handler.py,sha256=
|
95
|
+
arpakitlib/_arpakit_project_template_v_5/project/api/exception.py,sha256=J1RNvEcF-1ZVCXgQSpuoUqBTqd-QjfyFnsbbTVu1rv8,1372
|
96
|
+
arpakitlib/_arpakit_project_template_v_5/project/api/exception_handler.py,sha256=VzkABWb7wdqVP3XMtHMEPy0veSxM3X5OHsqoa2cwTQI,11385
|
97
97
|
arpakitlib/_arpakit_project_template_v_5/project/api/openapi_ui.py,sha256=PLhH-W6zDViO-75AGCs8Vq3IoyHChdqwBYAqLvdQN0U,904
|
98
98
|
arpakitlib/_arpakit_project_template_v_5/project/api/response.py,sha256=xZMymP2BuQaRNVWLeIp3UgUUo-MFN8MJnsn9Al4vOb8,1028
|
99
99
|
arpakitlib/_arpakit_project_template_v_5/project/api/router/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -246,7 +246,7 @@ arpakitlib/_arpakit_project_template_v_5/project/sqladmin_/model_view/api_key.py
|
|
246
246
|
arpakitlib/_arpakit_project_template_v_5/project/sqladmin_/model_view/common.py,sha256=StdbfHZ92qAP-l2lnvAeyYCaZuMHKskHq1E19zJh6MA,2471
|
247
247
|
arpakitlib/_arpakit_project_template_v_5/project/sqladmin_/model_view/operation.py,sha256=KUC-EZYFlLca92b6PwI0l5leOT8DzjlWm6y-a0PCvQc,3234
|
248
248
|
arpakitlib/_arpakit_project_template_v_5/project/sqladmin_/model_view/story_log.py,sha256=EePtnFQsDKvhHcPYQU4ahgo24jC6uBZkuzu2alrTviE,2180
|
249
|
-
arpakitlib/_arpakit_project_template_v_5/project/sqladmin_/model_view/user.py,sha256=
|
249
|
+
arpakitlib/_arpakit_project_template_v_5/project/sqladmin_/model_view/user.py,sha256=AbD0QPbAkwOE3i9aDirVBrIntQBCrU1xwX2IZlMS8Rk,2576
|
250
250
|
arpakitlib/_arpakit_project_template_v_5/project/sqladmin_/model_view/user_token.py,sha256=pyeyDTg4rss8-67hIE3-SQlAvNfje6HazuaVnyFBpN8,2054
|
251
251
|
arpakitlib/_arpakit_project_template_v_5/project/sqladmin_/model_view/verification_code.py,sha256=8dfmXKVsmLNf6Id6Ql52uVaZuQtqNCq5nJgBOv3N66A,2883
|
252
252
|
arpakitlib/_arpakit_project_template_v_5/project/sqladmin_/start_sqladmin.py,sha256=g3kNKPR4X-PKpiSe4oFLHbZ-EJIwmWUOK6a5FABat_Y,375
|
@@ -408,8 +408,8 @@ arpakitlib/ar_ssh_runner_util.py,sha256=yvAwza480MkHKvLkDEsR7JNh2bYNs6P9rCVo4NA8
|
|
408
408
|
arpakitlib/ar_str_util.py,sha256=2lGpnXDf2h1cBZpVf5i1tX_HCv5iBd6IGnrCw4QWWlY,4350
|
409
409
|
arpakitlib/ar_type_util.py,sha256=Cs_tef-Fc5xeyAF54KgISCsP11NHyzIsglm4S3Xx7iM,4049
|
410
410
|
arpakitlib/ar_yookassa_api_client_util.py,sha256=VozuZeCJjmLd1zj2BdC9WfiAQ3XYOrIMsdpNK-AUlm0,5347
|
411
|
-
arpakitlib-1.8.
|
412
|
-
arpakitlib-1.8.
|
413
|
-
arpakitlib-1.8.
|
414
|
-
arpakitlib-1.8.
|
415
|
-
arpakitlib-1.8.
|
411
|
+
arpakitlib-1.8.168.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
|
412
|
+
arpakitlib-1.8.168.dist-info/METADATA,sha256=XWzJqiszevtHB8nIrKVLHNSDRwIiVr9Gs8aurPZ8x2Q,3706
|
413
|
+
arpakitlib-1.8.168.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
414
|
+
arpakitlib-1.8.168.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
|
415
|
+
arpakitlib-1.8.168.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|