Skip to content

Commit

Permalink
Updated detecting forms with entities in FormUriActivity
Browse files Browse the repository at this point in the history
  • Loading branch information
grzesiek2010 committed Oct 25, 2024
1 parent c135792 commit c4e1d30
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,11 @@ private class FormUriViewModel(

val usesEntities = if (uriMimeType == FormsContract.CONTENT_ITEM_TYPE) {
val form = formsRepositoryProvider.create().get(ContentUriHelper.getIdFromUri(uri))!!
form.usesEntities() != null
form.usesEntities()
} else {
val instance = instancesRepositoryProvider.create().get(ContentUriHelper.getIdFromUri(uri))!!
val form = formsRepositoryProvider.create().getAllByFormIdAndVersion(instance.formId, instance.formVersion).first()
form.usesEntities() != null
form.usesEntities()
}

if (usesEntities) {
Expand Down

0 comments on commit c4e1d30

Please sign in to comment.