From b1c7ee4299e85bc486f27b3d065a225b9409b46a Mon Sep 17 00:00:00 2001 From: Davte Date: Sun, 21 Jul 2019 20:08:01 +0200 Subject: [PATCH] Get database url from database object --- davtelepot/__init__.py | 2 +- davtelepot/administration_tools.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/davtelepot/__init__.py b/davtelepot/__init__.py index 25f07e1..ee6d786 100644 --- a/davtelepot/__init__.py +++ b/davtelepot/__init__.py @@ -14,7 +14,7 @@ __author__ = "Davide Testa" __email__ = "davide@davte.it" __credits__ = ["Marco Origlia", "Nick Lee @Nickoala"] __license__ = "GNU General Public License v3.0" -__version__ = "2.1.26" +__version__ = "2.1.27" __maintainer__ = "Davide Testa" __contact__ = "t.me/davte" diff --git a/davtelepot/administration_tools.py b/davtelepot/administration_tools.py index 89a4aa3..b7685aa 100644 --- a/davtelepot/administration_tools.py +++ b/davtelepot/administration_tools.py @@ -679,10 +679,9 @@ async def _send_bot_database(bot, update, user_record): update=update, user_record=user_record, db_type=bot.db_url.partition(':///')[0] ) - database_name = extract(bot.db_url, starter='data/') await bot.send_document( chat_id=user_record['telegram_id'], - document_path=f'{{path}}/data/{database_name}', + document_path=extract(bot.db.url, starter='sqlite:///'), caption=bot.get_message( 'admin', 'db_command', 'file_caption', update=update, user_record=user_record