Skip to content

Commit

Permalink
Fix mapping for Document using a document link not extractions
Browse files Browse the repository at this point in the history
IPC-544
  • Loading branch information
zladzeyka committed Jan 13, 2025
1 parent f7b8a2b commit a6c8186
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ extension Document {
origin: Origin(rawValue: healthDocument.origin.rawValue) ?? .unknown,
pageCount: healthDocument.pageCount,
pages: healthDocument.pages?.compactMap { Document.Page(healthPage: $0) },
links: Links(giniAPIDocumentURL: healthDocument.links.extractions),
links: Links(giniAPIDocumentURL: healthDocument.links.document),
partialDocuments: healthDocument.partialDocuments?.compactMap { PartialDocumentInfo(document: $0.document, rotationDelta: $0.rotationDelta) },
progress: Progress(rawValue: healthDocument.progress.rawValue) ?? .completed,
sourceClassification: SourceClassification(rawValue: healthDocument.sourceClassification.rawValue) ?? .scanned,
Expand All @@ -135,7 +135,7 @@ extension Document {
GiniHealthAPILibrary.Document(creationDate: creationDate,
id: id,
name: name,
links: GiniHealthAPILibrary.Document.Links(giniAPIDocumentURL: links.extractions),
links: GiniHealthAPILibrary.Document.Links(giniAPIDocumentURL: links.document),
pageCount: pageCount,
sourceClassification: GiniHealthAPILibrary.Document.SourceClassification(rawValue: sourceClassification.rawValue) ?? .scanned,
expirationDate: expirationDate)
Expand Down

0 comments on commit a6c8186

Please sign in to comment.