mirror of
https://github.com/fastapi-practices/fastapi_best_architecture.git
synced 2026-03-13 09:31:31 +08:00
Remove deprecated parameter for code generation business (#1035)
* Remove deprecated parameter for code generation business * Update doc_comment * Fix doc_comment
This commit is contained in:
@@ -63,7 +63,6 @@ async def get_business_all_columns(
|
||||
@router.post(
|
||||
'',
|
||||
summary='创建代码生成业务',
|
||||
deprecated=True,
|
||||
dependencies=[
|
||||
Depends(RequestPermission('codegen:business:add')),
|
||||
DependsRBAC,
|
||||
|
||||
@@ -66,7 +66,11 @@ class GenService:
|
||||
raise errors.ConflictError(msg='已存在相同数据库表业务')
|
||||
|
||||
table_name = table_info['table_name']
|
||||
doc_comment = table_info['table_comment'] or table_name.split('_')[-1]
|
||||
doc_comment = (
|
||||
table_info['table_comment'][:-1]
|
||||
if table_info['table_comment'][-1] == '表'
|
||||
else table_info['table_comment'] or table_name.split('_')[-1]
|
||||
)
|
||||
new_business = GenBusiness(
|
||||
**CreateGenBusinessParam(
|
||||
app_name=obj.app,
|
||||
|
||||
Reference in New Issue
Block a user