From 0e268414f9ec5680bafd25e68f36dabfa63ce35d Mon Sep 17 00:00:00 2001 From: Davte Date: Sun, 29 Sep 2019 20:16:39 +0200 Subject: [PATCH] Prevent UnboundLocalError --- davtelepot/__init__.py | 2 +- davtelepot/administration_tools.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/davtelepot/__init__.py b/davtelepot/__init__.py index edb0b19..1f0aff9 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.3.1" +__version__ = "2.3.2" __maintainer__ = "Davide Testa" __contact__ = "t.me/davte" diff --git a/davtelepot/administration_tools.py b/davtelepot/administration_tools.py index fc788be..75bab75 100644 --- a/davtelepot/administration_tools.py +++ b/davtelepot/administration_tools.py @@ -863,6 +863,7 @@ async def _query_command(bot, update, user_record): bot, ['query', ] ) + query_id = None if len(query) == 0: return bot.get_message( 'admin', 'query_command', 'help', @@ -918,7 +919,7 @@ async def _query_command(bot, update, user_record): make_button( text='CSV', prefix='db_query:///', - data=['csv', query_id] + data=(['csv', query_id] if query_id else []) ) ], 1