Quellcode durchsuchen

suhh-知识库和机器人新增编辑权限默认为1:本账号

‘suhuihui’ vor 1 Monat
Ursprung
Commit
f67bbfc182
2 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 1 1
      api/services/app_service.py
  2. 1 0
      api/services/dataset_service.py

+ 1 - 1
api/services/app_service.py

@@ -203,7 +203,7 @@ class AppService:
         app.created_by = account.id
         app.dept_id =account.dept_id
         app.updated_by = account.id
-
+        app.edit_auth = 1
         db.session.add(app)
         db.session.flush()
 

+ 1 - 0
api/services/dataset_service.py

@@ -439,6 +439,7 @@ class DatasetService:
         dataset.permission = DatasetPermissionEnum.ALL_TEAM
         dataset.provider = provider
         dataset.dept_id = account.dept_id
+        dataset.edit_auth = 1
         db.session.add(dataset)
         db.session.flush()