From c303f620050b9685eb40520230db695de085fc92 Mon Sep 17 00:00:00 2001 From: profitroll Date: Wed, 30 Aug 2023 12:56:20 +0200 Subject: [PATCH] Fixed "location" instead of "locations" --- modules/reminder.py | 2 +- plugins/commands/upcoming.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/reminder.py b/modules/reminder.py index b845303..134b0e2 100644 --- a/modules/reminder.py +++ b/modules/reminder.py @@ -39,7 +39,7 @@ async def remind(app: PyroClient) -> None: entries = await col_entries.find( { - "location": {"$in": location.id}, + "locations": {"$in": location.id}, "date": user_date.replace(hour=0, minute=0), } ).to_list() diff --git a/plugins/commands/upcoming.py b/plugins/commands/upcoming.py index b96665f..c5866c5 100644 --- a/plugins/commands/upcoming.py +++ b/plugins/commands/upcoming.py @@ -39,7 +39,7 @@ async def command_upcoming(app: PyroClient, message: Message): await GarbageEntry.from_record(entry) async for entry in col_entries.find( { - "location": {"$in": user.location.id}, + "locations": {"$in": user.location.id}, "date": {"$gte": date_min, "$lte": date_max}, } )