Skip to content

Commit fdf6780

Browse files
committed
Fix query to send notif
1 parent fced7d8 commit fdf6780

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/pycamp_bot/commands/wizard.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ async def notify_scheduled_slots_to_wizard(update, context, pycamp, wizard, agen
169169
async def notify_schedule_to_wizards(update, context, pycamp):
170170
for wizard in pycamp.get_wizards():
171171
wizard_agenda = WizardAtPycamp.select().where(
172-
WizardAtPycamp.pycamp == pycamp & WizardAtPycamp.wizard == wizard
172+
(WizardAtPycamp.pycamp == pycamp) & (WizardAtPycamp.wizard == wizard)
173173
).order_by(WizardAtPycamp.init)
174174

175175
await notify_scheduled_slots_to_wizard(update, context, pycamp, wizard, wizard_agenda)
@@ -204,6 +204,17 @@ async def schedule_wizards(update, context):
204204

205205
await notify_schedule_to_wizards(update, context, pycamp)
206206

207+
agenda = WizardAtPycamp.select().where(WizardAtPycamp.pycamp == pycamp)
208+
209+
msg = format_wizards_schedule(agenda)
210+
211+
await context.bot.send_message(
212+
chat_id=update.message.chat_id,
213+
text=msg,
214+
parse_mode="MarkdownV2"
215+
)
216+
217+
207218

208219
def format_wizards_schedule(agenda):
209220
per_day = defaultdict(list)

0 commit comments

Comments
 (0)