From 93a52b5f43b3acbb26005bc8b066326e84a6e909 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 20 Feb 2025 14:01:46 +0100 Subject: [PATCH] [FIX] forwardport: type error `groupby` returns an iterator of `(key, list[value])`, not a recordset. So `BaseModel.__or__` is invalid. I missed that bit because I didn't bother writing a test where a PR has more than 6 months and triggers generating / sending emails, but turns out we do have those in the production database, and as a result the mergebot hasn't sent an outstanding fw notification since I deployed 892fce4ddfec19396cdfbb9cc8e4e750dbd954a5 in early february (oops). Thanks to @clbr-odoo for the notification / report of the issue. --- forwardport/models/project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forwardport/models/project.py b/forwardport/models/project.py index ebb63e80..fd5548c0 100644 --- a/forwardport/models/project.py +++ b/forwardport/models/project.py @@ -544,9 +544,9 @@ stderr: # after 6 months, start sending emails if age > datetime.timedelta(weeks=26): if author := source.author.email: - emails[author] |= prs + emails[author] = emails[author].union(*prs) if reviewer := source.reviewed_by.email: - emails[reviewer] |= prs + emails[reviewer] = emails[reviewer].union(*prs) self.env.ref('runbot_merge.forwardport.reminder')._send( repository=pr.repository, pull_request=pr.number,