Skip to content

Commit db2e01d

Browse files
committed
Fix v2.1.2
- Fix quick add error message (due to check) - Create date when new users
1 parent 6cdf4f3 commit db2e01d

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

bot/telegram_bot.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ def set_up(update, context) -> int:
9393
db.new_user_setup(telegram_id, sheet_id)
9494
current_datetime = dt.datetime.now(timezone)
9595
day = current_datetime.day
96+
month = current_datetime.strftime("%b")
9697
gs.update_rows(sheet_id, day, 4, 5) # New users start from row 5
98+
gs.create_date(sheet_id, day, month, 5)
9799
update.message.reply_text(SUCCESS_LINK_TEXT)
98100
return ConversationHandler.END
99101
except Exception as e:
@@ -544,7 +546,7 @@ def add_transport(update, context):
544546
except Exception as e:
545547
update.callback_query.message.reply_text(ERROR_TEXT)
546548
return ConversationHandler.END
547-
if setting_list is None or setting_list[0] is None:
549+
if not setting_list or not setting_list[0]:
548550
update.message.reply_text(QUICK_SETUP_TRANSPORT)
549551
return ConversationHandler.END
550552
else:
@@ -569,7 +571,7 @@ def add_others(update, context):
569571
except Exception as e:
570572
update.callback_query.message.reply_text(ERROR_TEXT)
571573
return ConversationHandler.END
572-
if setting_list is None or setting_list[0] is None:
574+
if not setting_list or not setting_list[0]:
573575
update.message.reply_text(QUICK_SETUP_OTHER)
574576
return ConversationHandler.END
575577
else:

release_notes.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,9 @@
6565
## Version 2.1.1 - Date 8 Jun 2023
6666
### Enhancement 🔥
6767
- Migrate to use firestore
68-
- Reformatted get overall transaction
68+
- Reformatted get overall transaction
69+
70+
## Version 2.1.2 - Date 26 Jun 2023
71+
### Bug Fix 🛠️
72+
- When new users join, new date entry was not created
73+
- Quick add settings not sending proper error message when either transport or others has been configured

0 commit comments

Comments
 (0)