|
@@ -239,7 +239,7 @@ class DatasetDocumentListApi(Resource):
|
|
|
document.check_by = check_account.name
|
|
|
if document.enable_applicant is not None:
|
|
|
applicant_account = AccountService.get_user_through_id(document.enable_applicant)
|
|
|
- document.enable_applicant = applicant_account.name
|
|
|
+ document.enable_application = applicant_account.name
|
|
|
|
|
|
data = marshal(documents, document_fields)
|
|
|
response = {
|
|
@@ -856,12 +856,13 @@ class DocumentStatusApi(DocumentResource):
|
|
|
if action == "enable":
|
|
|
if document.enabled:
|
|
|
continue
|
|
|
- if current_user not in (TenantAccountRole.ADMIN, TenantAccountRole.OWNER):
|
|
|
+ if current_user.current_role not in (TenantAccountRole.ADMIN, TenantAccountRole.OWNER):
|
|
|
document.enable_applicant = current_user.id
|
|
|
document.check_status = 1
|
|
|
db.session.commit()
|
|
|
return {"result": "该操作需要提交管理员审核后生效,请确认是否提交"}, 200
|
|
|
document.enabled = True
|
|
|
+ document.check_status = 3
|
|
|
document.disabled_at = None
|
|
|
document.disabled_by = None
|
|
|
document.check_by = current_user.id
|