fix: 修复没有项目时的报错

This commit is contained in:
maxmon 2023-04-16 19:46:36 +08:00
parent 924e85bea8
commit 75fb815d94
1 changed files with 2 additions and 0 deletions

View File

@ -18,6 +18,8 @@ def index():
ret_info = ReturnInfo()
try:
project_config_info = []
if not os.path.exists(PROJECTS):
os.makedirs(PROJECTS)
project_list = os.listdir(PROJECTS)
project_list.sort(key=lambda x: os.path.getctime(os.path.join(PROJECTS, x)), reverse=True)
for project_name in project_list: