fix(annotation): show new version warning even without annotation

Change has_new_version logic to compare current file version with
latest version, regardless of whether annotation exists.

Before: Only show warning if annotation exists and version is outdated
After: Show warning if current file is not the latest version

This ensures users are informed when viewing an old file version,
even if they haven't started annotating yet.
This commit is contained in:
2026-02-06 15:17:51 +08:00
parent 44a1f2193f
commit 1f6c821cbc

View File

@@ -1706,12 +1706,9 @@ class AnnotationEditorService:
annotation is not None and annotation_file_version is None
)
# 判断是否有新版本:最新版本 > 标注时的版本
has_new_version = (
latest_file_version > annotation_file_version
if annotation_file_version is not None
else False
)
# 判断是否有新版本:最新版本 > 当前文件版本
# 无论是否有标注,只要传入的文件不是最新版本就提示
has_new_version = latest_file_version > file_record.version
return {
"fileId": file_id,