Prevent UnboundLocalError
This commit is contained in:
parent
aa6f45887e
commit
0e268414f9
@ -14,7 +14,7 @@ __author__ = "Davide Testa"
|
|||||||
__email__ = "davide@davte.it"
|
__email__ = "davide@davte.it"
|
||||||
__credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
|
__credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
|
||||||
__license__ = "GNU General Public License v3.0"
|
__license__ = "GNU General Public License v3.0"
|
||||||
__version__ = "2.3.1"
|
__version__ = "2.3.2"
|
||||||
__maintainer__ = "Davide Testa"
|
__maintainer__ = "Davide Testa"
|
||||||
__contact__ = "t.me/davte"
|
__contact__ = "t.me/davte"
|
||||||
|
|
||||||
|
@ -863,6 +863,7 @@ async def _query_command(bot, update, user_record):
|
|||||||
bot,
|
bot,
|
||||||
['query', ]
|
['query', ]
|
||||||
)
|
)
|
||||||
|
query_id = None
|
||||||
if len(query) == 0:
|
if len(query) == 0:
|
||||||
return bot.get_message(
|
return bot.get_message(
|
||||||
'admin', 'query_command', 'help',
|
'admin', 'query_command', 'help',
|
||||||
@ -918,7 +919,7 @@ async def _query_command(bot, update, user_record):
|
|||||||
make_button(
|
make_button(
|
||||||
text='CSV',
|
text='CSV',
|
||||||
prefix='db_query:///',
|
prefix='db_query:///',
|
||||||
data=['csv', query_id]
|
data=(['csv', query_id] if query_id else [])
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
1
|
1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user