mirror of https://github.com/langgenius/dify.git
optimize codes
This commit is contained in:
parent
95c5848d05
commit
c4e6ed1aa2
|
|
@ -178,7 +178,7 @@ class AccountService:
|
|||
|
||||
@staticmethod
|
||||
def close_account(account: Account) -> None:
|
||||
"""todo: Close account"""
|
||||
"""Close account"""
|
||||
account.status = AccountStatus.CLOSED.value
|
||||
db.session.commit()
|
||||
|
||||
|
|
@ -443,7 +443,7 @@ class RegisterService:
|
|||
|
||||
db.session.commit()
|
||||
except Exception as e:
|
||||
db.session.rollback() # todo: do not work
|
||||
db.session.rollback()
|
||||
logging.error(f'Register failed: {e}')
|
||||
raise AccountRegisterError(f'Registration failed: {e}') from e
|
||||
|
||||
|
|
|
|||
|
|
@ -118,8 +118,6 @@ class WorkflowService:
|
|||
if not draft_workflow:
|
||||
raise ValueError('No valid workflow found.')
|
||||
|
||||
# TODO check if the workflow structure is valid
|
||||
|
||||
# create new workflow
|
||||
workflow = Workflow(
|
||||
tenant_id=app_model.tenant_id,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ def send_invite_member_mail_task(language: str, to: str, token: str, inviter_nam
|
|||
fg='green'))
|
||||
start_at = time.perf_counter()
|
||||
|
||||
# TODO send invite member mail using different languages
|
||||
# send invite member mail using different languages
|
||||
try:
|
||||
url = f'{current_app.config.get("CONSOLE_WEB_URL")}/activate?token={token}'
|
||||
if language == 'zh-Hans':
|
||||
|
|
|
|||
|
|
@ -51,6 +51,3 @@ def test_execute_answer():
|
|||
|
||||
assert result.status == WorkflowNodeExecutionStatus.SUCCEEDED
|
||||
assert result.outputs['answer'] == "Today's weather is sunny\nYou are a helpful AI.\n{{img}}\nFin."
|
||||
|
||||
|
||||
# TODO test files
|
||||
|
|
|
|||
Loading…
Reference in New Issue