fix the build :fired:

This commit is contained in:
Régis Hanol 2015-06-17 17:45:53 +02:00
parent 874b2a628d
commit 3db743640e
1 changed files with 5 additions and 1 deletions

View File

@ -14,7 +14,11 @@ module Jobs
domains = group.automatic_membership_email_domains.gsub('.', '\.') domains = group.automatic_membership_email_domains.gsub('.', '\.')
User.where("email ~* '@(#{domains})$'").find_each do |user| 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
end end