From 63d08c5b13afe32bb4515b1d9097cee138cefee6 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Wed, 19 Nov 2025 11:02:00 +0100 Subject: [PATCH] Prevent creating overlapping records https://3.basecamp.com/2914079/buckets/27/card_tables/cards/9275047474 --- app/models/user/notifiable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user/notifiable.rb b/app/models/user/notifiable.rb index b0e4ffcad..ef5249611 100644 --- a/app/models/user/notifiable.rb +++ b/app/models/user/notifiable.rb @@ -9,7 +9,7 @@ module User::Notifiable end def bundle(notification) - transaction do + with_lock do find_or_create_bundle_for(notification) end end