From 76fd011b12c855c456037c755040d9232d31f9d7 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 19 Jun 2022 00:59:18 +1000 Subject: [PATCH] Fix test failures when running with new schema enabled --- AnkiDroid/src/main/java/com/ichi2/libanki/Storage.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/AnkiDroid/src/main/java/com/ichi2/libanki/Storage.kt b/AnkiDroid/src/main/java/com/ichi2/libanki/Storage.kt index 967427685a2e..19453b73c667 100644 --- a/AnkiDroid/src/main/java/com/ichi2/libanki/Storage.kt +++ b/AnkiDroid/src/main/java/com/ichi2/libanki/Storage.kt @@ -84,7 +84,11 @@ object Storage { log: Boolean = false, ): Collection { val backend = BackendFactory.getBackend(context) - return Collection(context, path, server, log, backend) + return if (backend.legacySchema) { + Collection(context, path, server, log, backend) + } else { + CollectionV16(context, path, server, log, backend) + } } /**