diff --git a/notifications_routing/data_source/postgres/postgres_data_source.py b/notifications_routing/data_source/postgres/postgres_data_source.py index d115de97c2f39b8b45824e4f3e15a3bb9b253bda..48b8bedf211ccbdead7707f91acd343de08fc855 100644 --- a/notifications_routing/data_source/postgres/postgres_data_source.py +++ b/notifications_routing/data_source/postgres/postgres_data_source.py @@ -255,6 +255,7 @@ class PostgresDataSource(DataSource): """Delete user feed notifications.""" with self.session() as session: user_feed_notifications = session.query(UserFeedNotification).filter( + UserFeedNotification.userId == user_id, UserFeedNotification.frequencyType == frequency_type, UserFeedNotification.creationDatetime <= runtime_datetime, UserFeedNotification.deliveryTime == runtime_time,