Small pep8 changes
This commit is contained in:
parent
2cebafa312
commit
ad7d8c4146
@ -63,8 +63,7 @@ def start_name_setter(message):
|
|||||||
bot.reply_to(message, "Name has to be alphanumeric (including underscores) and start with a letter")
|
bot.reply_to(message, "Name has to be alphanumeric (including underscores) and start with a letter")
|
||||||
return
|
return
|
||||||
|
|
||||||
else:
|
user_name = str(message.text)
|
||||||
user_name = str(message.text)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
user = User(telegram_id=user_id, username=user_name, admin=False)
|
user = User(telegram_id=user_id, username=user_name, admin=False)
|
||||||
@ -291,6 +290,11 @@ def add_product(message):
|
|||||||
|
|
||||||
|
|
||||||
def receive_product_data(message):
|
def receive_product_data(message):
|
||||||
|
""" registering new product in the db and fetching it from amazon
|
||||||
|
|
||||||
|
Args:
|
||||||
|
message (Message): Message that is being reacted to. Always from add_product because of next_step_handler
|
||||||
|
"""
|
||||||
# TODO: Check if user is admin
|
# TODO: Check if user is admin
|
||||||
user_id = int(message.from_user.id)
|
user_id = int(message.from_user.id)
|
||||||
product_id = str(message.text)
|
product_id = str(message.text)
|
||||||
|
Loading…
Reference in New Issue
Block a user