From 3db743640e3733b77c601e05444e48a84f52a9d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Wed, 17 Jun 2015 17:45:53 +0200 Subject: [PATCH] fix the build :fired: --- app/jobs/regular/automatic_group_membership.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/jobs/regular/automatic_group_membership.rb b/app/jobs/regular/automatic_group_membership.rb index ae524685cfb..b849b018b29 100644 --- a/app/jobs/regular/automatic_group_membership.rb +++ b/app/jobs/regular/automatic_group_membership.rb @@ -14,7 +14,11 @@ module Jobs domains = group.automatic_membership_email_domains.gsub('.', '\.') User.where("email ~* '@(#{domains})$'").find_each do |user| - group.add(user) rescue ActiveRecord::RecordNotUnique, PG::UniqueViolation + begin + group.add(user) + rescue ActiveRecord::RecordNotUnique, PG::UniqueViolation + # we don't care about this + end end end