Prevent UnboundLocalError
This commit is contained in:
parent
aa6f45887e
commit
0e268414f9
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user