Skip to content

Commit

Permalink
fix(health-sdk): Fix invoices upload in the example app
Browse files Browse the repository at this point in the history
Issue was caused by PR #483.

IPC-295
  • Loading branch information
a-szotyori authored and llevente committed Jul 17, 2024
1 parent dcb2041 commit 2f35bea
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ class InvoicesRepository(
}
}

invoicesLocalDataSource.appendInvoicesWithExtractions(documentsWithExtractions)

val errors = createdResources.awaitAll().mapNotNull { resource ->
if (resource is Resource.Error) {
resource.message
Expand All @@ -70,6 +68,8 @@ class InvoicesRepository(
}

if (errors.isEmpty()) {
invoicesLocalDataSource.appendInvoicesWithExtractions(documentsWithExtractions)

_uploadHardcodedInvoicesStateFlow.value = UploadHardcodedInvoicesState.Success
} else {
_uploadHardcodedInvoicesStateFlow.value = UploadHardcodedInvoicesState.Failure(errors)
Expand Down

0 comments on commit 2f35bea

Please sign in to comment.