summaryrefslogtreecommitdiff
path: root/lib/vendor-document-list/sync-service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vendor-document-list/sync-service.ts')
-rw-r--r--lib/vendor-document-list/sync-service.ts14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/vendor-document-list/sync-service.ts b/lib/vendor-document-list/sync-service.ts
index e058803b..0544ce06 100644
--- a/lib/vendor-document-list/sync-service.ts
+++ b/lib/vendor-document-list/sync-service.ts
@@ -309,10 +309,16 @@ class SyncService {
throw new Error('DOLCE upload is not enabled')
}
- // 변경사항에서 리비전 ID들 추출
- const revisionIds = changes
- .filter(change => change.entityType === 'revision')
- .map(change => change.entityId)
+ // 변경사항에서 리비전 ID들 추출 (revision 엔티티 + attachment 엔티티의 revisionId)
+ const revisionIds = [...new Set([
+ ...changes
+ .filter(change => change.entityType === 'revision')
+ .map(change => change.entityId),
+ ...changes
+ .filter(change => change.entityType === 'attachment')
+ .map(change => change.newValues?.revisionId)
+ .filter((id): id is number => typeof id === 'number' && id > 0)
+ ])]
if (revisionIds.length === 0) {
return {