Merge pull request #252 from henryhyn/fix/help-f-string

fix: 修复 f-string 双引号问题
This commit is contained in:
程序员阿江-Relakkes 2024-04-26 23:58:25 +08:00 committed by GitHub
commit 2d051cc670
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -274,7 +274,7 @@ def get_img_urls_by_trace_id(trace_id: str, format_type: str = "png"):
def get_trace_id(img_url: str):
# 浏览器端上传的图片多了 /spectrum/ 这个路径
return f"spectrum/{img_url.split("/")[-1]}" if img_url.find("spectrum") != -1 else img_url.split("/")[-1]
return f"spectrum/{img_url.split('/')[-1]}" if img_url.find("spectrum") != -1 else img_url.split("/")[-1]
if __name__ == '__main__':