diff --git a/openlp/plugins/bibles/lib/db.py b/openlp/plugins/bibles/lib/db.py index 6df2efab8..bccff3559 100644 --- a/openlp/plugins/bibles/lib/db.py +++ b/openlp/plugins/bibles/lib/db.py @@ -159,10 +159,10 @@ class BibleDB(Manager): if not isinstance(self.name, str): self.name = str(self.name, 'utf-8') # TODO: To path object - file_path = Path(clean_filename(self.name) + '.sqlite') + self.file_path = Path(clean_filename(self.name) + '.sqlite') if 'file' in kwargs: - file_path = kwargs['file'] - Manager.__init__(self, 'bibles', init_schema, file_path, upgrade) + self.file_path = kwargs['file'] + Manager.__init__(self, 'bibles', init_schema, self.file_path, upgrade) if self.session and 'file' in kwargs: self.get_name() self._is_web_bible = None diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py index e3423ccf1..d638512b2 100644 --- a/openlp/plugins/bibles/lib/manager.py +++ b/openlp/plugins/bibles/lib/manager.py @@ -187,7 +187,7 @@ class BibleManager(LogMixin, RegistryProperties): bible = self.db_cache[name] bible.session.close_all() bible.session = None - return delete_file(Path(bible.path, bible.file)) + return delete_file(bible.path, bible.file_path) def get_bibles(self): """