You've already forked DataMate
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user