From 7adb4d27eff9269913b8e57f9e3c94c01f304781 Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Thu, 21 Nov 2024 10:00:03 +0100 Subject: [PATCH] database.files_db:FileDB - check initialisation before version --- acacore/database/files_db.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acacore/database/files_db.py b/acacore/database/files_db.py index 68997f5..e401725 100644 --- a/acacore/database/files_db.py +++ b/acacore/database/files_db.py @@ -205,10 +205,10 @@ def __init__( ], ) - if check_initialisation and not self.is_initialised(check_views=False, check_indices=False): + if (check_initialisation or check_version) and not self.is_initialised(check_views=False, check_indices=False): raise DatabaseError("Database is not initialised") - if check_version and self.is_initialised(): + if check_version: from acacore.database.upgrade import is_latest is_latest(self, raise_on_difference=True)